Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -331,8 +331,11 @@ async def add_exp(member_id):
|
|
| 331 |
print("Calculating rank...")
|
| 332 |
copy_df = global_df.copy()
|
| 333 |
copy_df['discord_user_id'] = copy_df['discord_user_id'].str.strip('L').astype(str)
|
|
|
|
| 334 |
copy_df['total_exp'] = copy_df['total_exp'].str.strip('L').astype(int)
|
|
|
|
| 335 |
row = copy_df[copy_df['discord_user_id'] == str(member_id)]
|
|
|
|
| 336 |
target_exp = row['total_exp'].values[0]
|
| 337 |
rank = (copy_df['total_exp'] > target_exp).sum() + 1
|
| 338 |
print(f"The rank for {member} based on total_exp is: {rank}")
|
|
|
|
| 331 |
print("Calculating rank...")
|
| 332 |
copy_df = global_df.copy()
|
| 333 |
copy_df['discord_user_id'] = copy_df['discord_user_id'].str.strip('L').astype(str)
|
| 334 |
+
print(copy_df['discord_user_id'])
|
| 335 |
copy_df['total_exp'] = copy_df['total_exp'].str.strip('L').astype(int)
|
| 336 |
+
print(copy_df['total_exp'])
|
| 337 |
row = copy_df[copy_df['discord_user_id'] == str(member_id)]
|
| 338 |
+
print(row)
|
| 339 |
target_exp = row['total_exp'].values[0]
|
| 340 |
rank = (copy_df['total_exp'] > target_exp).sum() + 1
|
| 341 |
print(f"The rank for {member} based on total_exp is: {rank}")
|