Multichem commited on
Commit
f81438a
·
1 Parent(s): c338a7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -53,6 +53,8 @@ def init_baselines():
53
  gamelog_table['reboundChancesTotal'].replace("", 0, inplace=True)
54
  gamelog_table['passes'].replace("", 0, inplace=True)
55
  gamelog_table['touches'].replace("", 0, inplace=True)
 
 
56
  gamelog_table['REB'] = gamelog_table['REB'].astype(int)
57
  gamelog_table['assists'] = gamelog_table['assists'].astype(int)
58
  gamelog_table['reboundChancesTotal'] = gamelog_table['reboundChancesTotal'].astype(int)
@@ -60,8 +62,8 @@ def init_baselines():
60
  gamelog_table['touches'] = gamelog_table['touches'].astype(int)
61
  gamelog_table['rebound%'] = gamelog_table['REB'] / gamelog_table['reboundChancesTotal']
62
  gamelog_table['assists_per_pass'] = gamelog_table['assists'] / gamelog_table['passes']
63
- gamelog_table['Fantasy_per_touch'] = gamelog_table['Fantasy'] / gamelog_table['passes']
64
- gamelog_table['FD_Fantasy_per_touch'] = gamelog_table['FD_Fantasy'] / gamelog_table['passes']
65
 
66
  season_long_table = gamelog_table[['PLAYER_NAME', 'TEAM_NAME']]
67
  season_long_table['MIN'] = gamelog_table.groupby(['PLAYER_NAME', 'SEASON_ID'], sort=False)['MIN'].transform('mean').astype(float)
 
53
  gamelog_table['reboundChancesTotal'].replace("", 0, inplace=True)
54
  gamelog_table['passes'].replace("", 0, inplace=True)
55
  gamelog_table['touches'].replace("", 0, inplace=True)
56
+ gamelog_table['Fantasy'].replace("", 0, inplace=True)
57
+ gamelog_table['FD_Fantasy'].replace("", 0, inplace=True)
58
  gamelog_table['REB'] = gamelog_table['REB'].astype(int)
59
  gamelog_table['assists'] = gamelog_table['assists'].astype(int)
60
  gamelog_table['reboundChancesTotal'] = gamelog_table['reboundChancesTotal'].astype(int)
 
62
  gamelog_table['touches'] = gamelog_table['touches'].astype(int)
63
  gamelog_table['rebound%'] = gamelog_table['REB'] / gamelog_table['reboundChancesTotal']
64
  gamelog_table['assists_per_pass'] = gamelog_table['assists'] / gamelog_table['passes']
65
+ gamelog_table['Fantasy_per_touch'] = gamelog_table['Fantasy'] / gamelog_table['touches']
66
+ gamelog_table['FD_Fantasy_per_touch'] = gamelog_table['FD_Fantasy'] / gamelog_table['touches']
67
 
68
  season_long_table = gamelog_table[['PLAYER_NAME', 'TEAM_NAME']]
69
  season_long_table['MIN'] = gamelog_table.groupby(['PLAYER_NAME', 'SEASON_ID'], sort=False)['MIN'].transform('mean').astype(float)