Spaces:
Runtime error
Runtime error
Update elo.py
Browse files
elo.py
CHANGED
@@ -23,7 +23,7 @@ def update_elo_ratings(ratings_dataset, winner, loser, k_factor=32):
|
|
23 |
for player in [winner, loser]:
|
24 |
if player not in ratings_df['bot_name'].values:
|
25 |
new_player = {'bot_name': player, 'elo_rating': 1200}
|
26 |
-
ratings_df = ratings_df.
|
27 |
|
28 |
# Extract old ratings
|
29 |
winner_old_rating = ratings_df.loc[ratings_df['bot_name'] == winner, 'elo_rating'].iloc[0]
|
|
|
23 |
for player in [winner, loser]:
|
24 |
if player not in ratings_df['bot_name'].values:
|
25 |
new_player = {'bot_name': player, 'elo_rating': 1200}
|
26 |
+
ratings_df = pd.concat([ratings_df,pd.DataFrame([new_player])],ignore_index=True)
|
27 |
|
28 |
# Extract old ratings
|
29 |
winner_old_rating = ratings_df.loc[ratings_df['bot_name'] == winner, 'elo_rating'].iloc[0]
|