Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created August 23, 2018 14:06
Show Gist options
  • Save lmiller1990/1e195bc7b9dbb53dacc20c9a6886bd07 to your computer and use it in GitHub Desktop.
Save lmiller1990/1e195bc7b9dbb53dacc20c9a6886bd07 to your computer and use it in GitHub Desktop.
fields_to_correlate = 'side fb fd ft fbaron result'.split()
def do_correlation(team):
games = team_games(df, team) # [fields_to_correlate]
games.replace(' ', np.nan, inplace=True) # replace empty values
corr = games[fields_to_correlate].corr()
print(corr.round(2))
do_correlation('team liquid')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment