Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -337,6 +337,8 @@ async def add_exp(member_id):
|
|
337 |
# discord_user_id to string
|
338 |
copy_df['discord_user_id'] = copy_df['discord_user_id'].astype(str).str.strip('L')
|
339 |
print("After processing discord_user_id:\n", copy_df['discord_user_id'].head())
|
|
|
|
|
340 |
|
341 |
# NaN -> 0
|
342 |
copy_df['total_exp'] = copy_df['total_exp'].fillna(0)
|
@@ -349,7 +351,7 @@ async def add_exp(member_id):
|
|
349 |
print("Processed copy_df:\n", copy_df.head())
|
350 |
|
351 |
# if member_id exists in the DataFrame
|
352 |
-
if member_id in copy_df['discord_user_id'].values:
|
353 |
print(f"Member ID {member_id} found in the DataFrame.")
|
354 |
row = copy_df[copy_df['discord_user_id'] == str(member_id)]
|
355 |
print(f"Row for member_id {member_id}:\n", row)
|
|
|
337 |
# discord_user_id to string
|
338 |
copy_df['discord_user_id'] = copy_df['discord_user_id'].astype(str).str.strip('L')
|
339 |
print("After processing discord_user_id:\n", copy_df['discord_user_id'].head())
|
340 |
+
print("Data type of discord_user_id:", copy_df['discord_user_id'].dtype)
|
341 |
+
print("Data type of member_id:", member_id.dtype)
|
342 |
|
343 |
# NaN -> 0
|
344 |
copy_df['total_exp'] = copy_df['total_exp'].fillna(0)
|
|
|
351 |
print("Processed copy_df:\n", copy_df.head())
|
352 |
|
353 |
# if member_id exists in the DataFrame
|
354 |
+
if str(member_id) in copy_df['discord_user_id'].values:
|
355 |
print(f"Member ID {member_id} found in the DataFrame.")
|
356 |
row = copy_df[copy_df['discord_user_id'] == str(member_id)]
|
357 |
print(f"Row for member_id {member_id}:\n", row)
|