Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -105,7 +105,7 @@ spendings = pd.read_csv("september_transactions_detailed.csv", names = columns)
|
|
| 105 |
spendings['Amount'] = pd.to_numeric(spendings['Amount'], errors='coerce').fillna(0)
|
| 106 |
|
| 107 |
def get_advice(user_id):
|
| 108 |
-
user_data =
|
| 109 |
|
| 110 |
if user_data.empty:
|
| 111 |
return "No spending data found for this user."
|
|
|
|
| 105 |
spendings['Amount'] = pd.to_numeric(spendings['Amount'], errors='coerce').fillna(0)
|
| 106 |
|
| 107 |
def get_advice(user_id):
|
| 108 |
+
user_data = spendings[spendings['UserID'] == user_id]
|
| 109 |
|
| 110 |
if user_data.empty:
|
| 111 |
return "No spending data found for this user."
|