-
-
Save lmiller1990/03be1e7c2e2b62881753d4df19b16eda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def games_by_league(df, league): | |
return df[df.league.isin(league)].drop_duplicates(subset=['gameid', 'team']) | |
def teams_by_league(df, league="nalcs"): | |
data = df[df.league.isin(league)].drop_duplicates(subset=['team'])['team'] | |
return data.values |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment