Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ def init_baselines():
|
|
| 61 |
raw_display.replace('', np.nan, inplace=True)
|
| 62 |
raw_display = raw_display[['NBAID', 'PID', 'Player', 'TC', 'MP (Today)', 'Next Game', 'H/R', 'Injury Notes', 'Player Impact per 48', 'Player Impact',
|
| 63 |
'Team PM', 'Last Updated']]
|
| 64 |
-
raw_display.apply(pd.to_numeric, errors='coerce').fillna(raw_display)
|
| 65 |
public_minutes = raw_display[raw_display['NBAID'] != ""]
|
| 66 |
|
| 67 |
sh = gcservice_account.open_by_url(NBABettingModel)
|
|
@@ -74,7 +74,8 @@ def init_baselines():
|
|
| 74 |
raw_display.replace('', np.nan, inplace=True)
|
| 75 |
raw_display = raw_display[['PID', 'Player', 'Team', 'Avg Minutes last 30 days for team', 'Minutes Projection', 'Rotation Impact (versus last 30 days)',
|
| 76 |
'Injury Notes', 'Minute Change', 'Baseline Team PM', 'Net Rotation PM +/- for Team', 'Projected PM for Game', 'Offset', 'Rank']]
|
| 77 |
-
raw_display.
|
|
|
|
| 78 |
player_impact = raw_display[raw_display['PID'] != ""]
|
| 79 |
|
| 80 |
return public_minutes, player_impact
|
|
|
|
| 61 |
raw_display.replace('', np.nan, inplace=True)
|
| 62 |
raw_display = raw_display[['NBAID', 'PID', 'Player', 'TC', 'MP (Today)', 'Next Game', 'H/R', 'Injury Notes', 'Player Impact per 48', 'Player Impact',
|
| 63 |
'Team PM', 'Last Updated']]
|
| 64 |
+
raw_display = raw_display.apply(pd.to_numeric, errors='coerce').fillna(raw_display)
|
| 65 |
public_minutes = raw_display[raw_display['NBAID'] != ""]
|
| 66 |
|
| 67 |
sh = gcservice_account.open_by_url(NBABettingModel)
|
|
|
|
| 74 |
raw_display.replace('', np.nan, inplace=True)
|
| 75 |
raw_display = raw_display[['PID', 'Player', 'Team', 'Avg Minutes last 30 days for team', 'Minutes Projection', 'Rotation Impact (versus last 30 days)',
|
| 76 |
'Injury Notes', 'Minute Change', 'Baseline Team PM', 'Net Rotation PM +/- for Team', 'Projected PM for Game', 'Offset', 'Rank']]
|
| 77 |
+
raw_display['Minutes Change'].replace('+', '', inplace=True)
|
| 78 |
+
raw_display = raw_display.apply(pd.to_numeric, errors='coerce').fillna(raw_display)
|
| 79 |
player_impact = raw_display[raw_display['PID'] != ""]
|
| 80 |
|
| 81 |
return public_minutes, player_impact
|