add price_band

This commit is contained in:
2026-06-17 08:15:40 +00:00
parent 7e743c1157
commit cfdeef41cb

View File

@@ -32,5 +32,9 @@ def transform_example_dataset(df: pd.DataFrame) -> pd.DataFrame:
"""Applies a simple transformation to the example dataset.""" """Applies a simple transformation to the example dataset."""
df["total_price"] = df["quantity"] * df["unit_price"] df["total_price"] = df["quantity"] * df["unit_price"]
df["price_band"] = df["total_price"].apply(
lambda value: "high" if value >= 25 else "standard"
)
return df return df