-
-
Save lmiller1990/4e01fa148a9764d274bc50b307071646 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 team_games(df, team): | |
""" | |
Returns all unique games played by a team. | |
Arguments: | |
df: the dataframe containing the data. | |
team: the team you are interested in. Eg: "Echo Fox" | |
""" | |
return df[ | |
( df['team'] == team ) & | |
( df['player'] == 'Team' ) | |
].drop_duplicates(subset=['gameid']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment