calculate total price as quantity * unit_price
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 2m47s
Check Deleted Workflows / check-deleted-workflows (pull_request) Successful in 59s

This commit is contained in:
2026-06-15 13:07:59 +00:00
parent e46c826c01
commit 18bd8f039a

View File

@@ -31,8 +31,7 @@ def generate_example_dataset() -> pd.DataFrame:
def transform_example_dataset(df: pd.DataFrame) -> pd.DataFrame: 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["price_band"] = df["total_price"].apply( df["total_price"] = df["quantity"] * df["unit_price"]
lambda value: "high" if value >= 25 else "standard"
)
return df return df