Skip to content

Commit

Permalink
Remove Big 5 European Leagues Combined when split_up_big5 is True
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzodb1 committed Feb 21, 2024
1 parent 3b4894c commit f9baf10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fbrefdata/fbref.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def read_leagues(self, split_up_big5: bool = False) -> pd.DataFrame:
(set(self.leagues) - {"Big 5 European Leagues Combined"})
| set(BIG_FIVE_DICT.values())
)
elif set(BIG_FIVE_DICT.values()).issubset(set(self.leagues)) and not split_up_big5:
leagues = list(set(self.leagues) - set(BIG_FIVE_DICT.values()))
return df[df.index.isin(leagues)]

def read_seasons(self, split_up_big5: bool = False) -> pd.DataFrame:
Expand Down

0 comments on commit f9baf10

Please sign in to comment.