-
-
Save lmiller1990/69b90b4ced019dae5414671eb4ac13ec 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
fields = ['fb', 'ft', 'fd', 'fbaron'] | |
teams = teams_by_league(df, ['nalcs']) | |
stats = {} | |
for f in fields: | |
status[f] = [] | |
for team in teams: | |
games = team_games(df, team) | |
taken = games[f].sum() | |
total = games[f].shape[0] | |
stats[f].append(taken/total) | |
result = pd.DataFrame(stats, index=teams) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment