Compare commits
4 Commits
41738a81ec
...
18bd8f039a
| Author | SHA1 | Date | |
|---|---|---|---|
| 18bd8f039a | |||
| e46c826c01 | |||
| ae83ac8a99 | |||
| 88d4b9e883 |
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user