rwitz commited on
Commit
9cca78f
1 Parent(s): d5f3e47

Update elo.py

Browse files
Files changed (1) hide show
  1. elo.py +1 -1
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.append(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]
 
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]