Commit ·
6125d10
1
Parent(s): 5dfcd36
Update match_parser.py
Browse files- match_parser.py +1 -1
match_parser.py
CHANGED
|
@@ -240,7 +240,7 @@ def get_best_competitions(df: pd.DataFrame, is_tournament: bool, top_n: int = 5)
|
|
| 240 |
df['rating_increase'] = df['rating'] - df['pre-competition_rating']
|
| 241 |
best_competition_dates = df.groupby(x_key_name)["rating_increase"].first().nlargest(top_n).index
|
| 242 |
|
| 243 |
-
tournament_df = df.loc[df.
|
| 244 |
[x_key_name]).first().sort_values(by='rating_increase', ascending=False).reset_index()
|
| 245 |
|
| 246 |
cols = []
|
|
|
|
| 240 |
df['rating_increase'] = df['rating'] - df['pre-competition_rating']
|
| 241 |
best_competition_dates = df.groupby(x_key_name)["rating_increase"].first().nlargest(top_n).index
|
| 242 |
|
| 243 |
+
tournament_df = df.loc[df[x_key_name].isin(best_competition_dates)].groupby(
|
| 244 |
[x_key_name]).first().sort_values(by='rating_increase', ascending=False).reset_index()
|
| 245 |
|
| 246 |
cols = []
|