Spaces:
No application file
No application file
File size: 455 Bytes
dd756d0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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
|