Spaces:
No application file
No application file
| import pandas as pd | |
| def load_data(): | |
| df_m = pd.read_csv("data/Hauler_Machine_IPR.csv") | |
| df_p = pd.read_csv("data/Hauler_People_IPR.csv") | |
| df_w = pd.read_csv("data/Hauler_Weather_IPR.csv") | |
| # Gabungkan berdasarkan tanggal | |
| df = df_m.merge(df_p, on="date", how="inner") | |
| df = df.merge(df_w, on="date", how="inner") | |
| # Pastikan kolom sesuai | |
| df["cuaca_bin"] = df["cuaca"].map({"cerah": 0, "hujan": 1}) | |
| return df | |