Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -66,7 +66,8 @@ def init_baselines():
|
|
66 |
gamelog_table['assists_per_pass'] = gamelog_table['assists'] / gamelog_table['passes']
|
67 |
gamelog_table['Fantasy_per_touch'] = gamelog_table['Fantasy'] / gamelog_table['touches']
|
68 |
gamelog_table['FD_Fantasy_per_touch'] = gamelog_table['FD_Fantasy'] / gamelog_table['touches']
|
69 |
-
gamelog_table.
|
|
|
70 |
|
71 |
season_long_table = gamelog_table[['PLAYER_NAME', 'TEAM_NAME']]
|
72 |
season_long_table['MIN'] = gamelog_table.groupby(['PLAYER_NAME', 'SEASON_ID'], sort=False)['MIN'].transform('mean').astype(float)
|
|
|
66 |
gamelog_table['assists_per_pass'] = gamelog_table['assists'] / gamelog_table['passes']
|
67 |
gamelog_table['Fantasy_per_touch'] = gamelog_table['Fantasy'] / gamelog_table['touches']
|
68 |
gamelog_table['FD_Fantasy_per_touch'] = gamelog_table['FD_Fantasy'] / gamelog_table['touches']
|
69 |
+
data_cols = gamelog_table.columns.drop(['PLAYER_NAME', 'TEAM_NAME', 'SEASON_ID', 'GAME_DATE', 'MATCHUP'])
|
70 |
+
gamelog_table[data_cols] = gamelog_table[data_cols].apply(pd.to_numeric, errors='coerce')
|
71 |
|
72 |
season_long_table = gamelog_table[['PLAYER_NAME', 'TEAM_NAME']]
|
73 |
season_long_table['MIN'] = gamelog_table.groupby(['PLAYER_NAME', 'SEASON_ID'], sort=False)['MIN'].transform('mean').astype(float)
|