Commit
·
23d63d8
1
Parent(s):
9bc9de8
Update match_parser.py
Browse files- match_parser.py +1 -2
match_parser.py
CHANGED
|
@@ -238,8 +238,7 @@ def get_worst_recent_losses(df: pd.DataFrame,
|
|
| 238 |
most_recent_competition_dates =df.groupby(x_key_name).first().reset_index().nlargest(top_n_comps,
|
| 239 |
columns=x_key_name)[x_key_name]
|
| 240 |
df_recent = df.loc[df[x_key_name].isin(most_recent_competition_dates)]
|
| 241 |
-
df_recent[
|
| 242 |
-
return df_recent.loc[df_recent.result == 'Lost'].sort_values("rating_difference", ascending=True).head(top_k_losses)
|
| 243 |
|
| 244 |
|
| 245 |
def get_best_competitions(df: pd.DataFrame, is_tournament: bool, top_n: int = 5) -> pd.DataFrame:
|
|
|
|
| 238 |
most_recent_competition_dates =df.groupby(x_key_name).first().reset_index().nlargest(top_n_comps,
|
| 239 |
columns=x_key_name)[x_key_name]
|
| 240 |
df_recent = df.loc[df[x_key_name].isin(most_recent_competition_dates)]
|
| 241 |
+
return df_recent.loc[df_recent.result == 'Lost'].sort_values("opponent_rating", ascending=True).head(top_k_losses)
|
|
|
|
| 242 |
|
| 243 |
|
| 244 |
def get_best_competitions(df: pd.DataFrame, is_tournament: bool, top_n: int = 5) -> pd.DataFrame:
|