Skip to content

Commit

Permalink
Direct pipeline between download() and process() re-established.
Browse files Browse the repository at this point in the history
  • Loading branch information
mchevalier2 committed Aug 8, 2024
1 parent 1ea1aaa commit 47ba188
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def get_status(x: str) -> str:

if True:
print(">>>>> Prepping data")
df_hourly = pd.read_csv("./data/dat.csv").drop_duplicates()
try:
df_hourly = pd.read_csv("./data/dat.csv").drop_duplicates()
except FileNotFoundError:
df_hourly = pd.read_csv("./data/latest_dat.csv").drop_duplicates()
df_hourly = df_hourly.dropna(subset=["date", "hour", "shop", "sensor_id", "count"])
df_hourly.insert(
6, "weekday", [pd.Timestamp(x).weekday() for x in df_hourly["date"]]
Expand Down

0 comments on commit 47ba188

Please sign in to comment.