Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created August 23, 2018 14:06
Show Gist options
  • Save lmiller1990/82d0d4a5dd9d88adfd18981bfe863182 to your computer and use it in GitHub Desktop.
Save lmiller1990/82d0d4a5dd9d88adfd18981bfe863182 to your computer and use it in GitHub Desktop.
for f in fields:
stats[f] = []
for team in teams:
games = team_games(df, team)
games.replace(" ", np.nan, inplace=True)
taken = games[f].sum()
total = games[f].shape[0]
stats[f].append(taken/total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment