Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,7 +122,11 @@ with tab1:
|
|
| 122 |
now = now_utc.astimezone(copenhagen_tz)
|
| 123 |
yesterday = now - timedelta(days=1)
|
| 124 |
|
| 125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
data_to_normalize = df_specific_time_range[['x', 'y', 'z']]
|
| 127 |
|
| 128 |
# Applying StandardScaler
|
|
|
|
| 122 |
now = now_utc.astimezone(copenhagen_tz)
|
| 123 |
yesterday = now - timedelta(days=1)
|
| 124 |
|
| 125 |
+
|
| 126 |
+
# Ensure the time column in the DataFrame is in datetime format
|
| 127 |
+
building_new['time'] = pd.to_datetime(building_new['time'])
|
| 128 |
+
|
| 129 |
+
df_specific_time_range = building_new[(building_new['time'] >= pd.to_datetime(yesterday)) & (building_new['time'] <= pd.to_datetime(now))]
|
| 130 |
data_to_normalize = df_specific_time_range[['x', 'y', 'z']]
|
| 131 |
|
| 132 |
# Applying StandardScaler
|