Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -244,8 +244,7 @@ elif menu == "Graph":
|
|
244 |
if st.session_state.history:
|
245 |
history_data = []
|
246 |
for record in st.session_state.history:
|
247 |
-
|
248 |
-
date = record['Date'].split("_")[0] # Use only the YYYY-MM-DD portion of the date
|
249 |
for index, row in record['Summary'].iterrows():
|
250 |
for drink in row['Drinks'].split(', '):
|
251 |
history_data.append({'Date': date, 'Item': drink, 'Type': 'Drink'})
|
|
|
244 |
if st.session_state.history:
|
245 |
history_data = []
|
246 |
for record in st.session_state.history:
|
247 |
+
date = record['Date']
|
|
|
248 |
for index, row in record['Summary'].iterrows():
|
249 |
for drink in row['Drinks'].split(', '):
|
250 |
history_data.append({'Date': date, 'Item': drink, 'Type': 'Drink'})
|