Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -203,6 +203,11 @@ if viz_button:
|
|
| 203 |
# Group by 'Category' and sum the 'Amount'
|
| 204 |
date_group = st.session_state['expenses'].groupby('Date')['Amount'].sum().reset_index()
|
| 205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
date_group = date_group.sort_values(by='Date')
|
| 207 |
|
| 208 |
# Extract dates and expenses for plotting
|
|
|
|
| 203 |
# Group by 'Category' and sum the 'Amount'
|
| 204 |
date_group = st.session_state['expenses'].groupby('Date')['Amount'].sum().reset_index()
|
| 205 |
|
| 206 |
+
|
| 207 |
+
# Ensure 'Date' column is datetime
|
| 208 |
+
date_group['Date'] = pd.to_datetime(date_group['Date'])
|
| 209 |
+
|
| 210 |
+
|
| 211 |
date_group = date_group.sort_values(by='Date')
|
| 212 |
|
| 213 |
# Extract dates and expenses for plotting
|