Spaces:
Runtime error
Runtime error
Zack
commited on
Commit
·
a131676
1
Parent(s):
747accb
chore: Fix indent
Browse files
app.py
CHANGED
|
@@ -83,7 +83,7 @@ def clean_data(df):
|
|
| 83 |
# Rename column
|
| 84 |
df.rename(columns={"Hourly_Labor_Hours_Total": "value"}, inplace=True)
|
| 85 |
|
| 86 |
-
|
| 87 |
# Convert "Date_CY" and "Hour" columns into datetime format
|
| 88 |
df["timestamp"] = pd.to_datetime(df["Date_CY"]) + pd.to_timedelta(df["Hour"].astype(int), unit='h')
|
| 89 |
|
|
|
|
| 83 |
# Rename column
|
| 84 |
df.rename(columns={"Hourly_Labor_Hours_Total": "value"}, inplace=True)
|
| 85 |
|
| 86 |
+
elif "Date_CY" in df.columns and "Hour" in df.columns and "Net_Sales_CY" in df.columns:
|
| 87 |
# Convert "Date_CY" and "Hour" columns into datetime format
|
| 88 |
df["timestamp"] = pd.to_datetime(df["Date_CY"]) + pd.to_timedelta(df["Hour"].astype(int), unit='h')
|
| 89 |
|