Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -73,8 +73,7 @@ def init_baselines():
|
|
73 |
gamelog_table['FD_Fantasy_per_touch'] = gamelog_table['FD_Fantasy'] / gamelog_table['touches']
|
74 |
data_cols = gamelog_table.columns.drop(['PLAYER_NAME', 'POS', 'TEAM_NAME', 'OPP_NAME', 'SEASON_ID', 'GAME_DATE', 'MATCHUP'])
|
75 |
gamelog_table[data_cols] = gamelog_table[data_cols].apply(pd.to_numeric, errors='coerce')
|
76 |
-
gamelog_table['spread'] =
|
77 |
-
gamelog_table.groupby(['OPP_NAME', 'GAME_DATE'], sort=False)['PTS'].transform('sum'))
|
78 |
gamelog_table['GAME_DATE'] = pd.to_datetime(gamelog_table['GAME_DATE']).dt.date
|
79 |
|
80 |
gamelog_table = gamelog_table.set_axis(['Player', 'Pos', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
|
|
73 |
gamelog_table['FD_Fantasy_per_touch'] = gamelog_table['FD_Fantasy'] / gamelog_table['touches']
|
74 |
data_cols = gamelog_table.columns.drop(['PLAYER_NAME', 'POS', 'TEAM_NAME', 'OPP_NAME', 'SEASON_ID', 'GAME_DATE', 'MATCHUP'])
|
75 |
gamelog_table[data_cols] = gamelog_table[data_cols].apply(pd.to_numeric, errors='coerce')
|
76 |
+
gamelog_table['spread'] = gamelog_table.groupby(['TEAM_NAME', 'GAME_DATE'], sort=False)['PTS'].transform('sum')
|
|
|
77 |
gamelog_table['GAME_DATE'] = pd.to_datetime(gamelog_table['GAME_DATE']).dt.date
|
78 |
|
79 |
gamelog_table = gamelog_table.set_axis(['Player', 'Pos', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|