Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,6 +61,9 @@ def init_baselines():
|
|
| 61 |
raw_display.rename(columns={"Name": "Player"}, inplace = True)
|
| 62 |
raw_display = raw_display[['Player', 'Position', 'Team', 'Opp', 'Minutes', '3P', 'Points', 'Rebounds', 'Assists', 'Steals', 'Blocks', 'Turnovers', 'Fantasy']]
|
| 63 |
player_stats = raw_display[raw_display['Minutes'] > 0]
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
worksheet = sh.worksheet('Timestamp')
|
| 66 |
timestamp = worksheet.acell('A1').value
|
|
@@ -70,6 +73,9 @@ def init_baselines():
|
|
| 70 |
raw_display.replace('', np.nan, inplace=True)
|
| 71 |
prop_frame = raw_display.dropna(subset='Player')
|
| 72 |
|
|
|
|
|
|
|
|
|
|
| 73 |
return game_model, player_stats, prop_frame, timestamp
|
| 74 |
|
| 75 |
def convert_df_to_csv(df):
|
|
|
|
| 61 |
raw_display.rename(columns={"Name": "Player"}, inplace = True)
|
| 62 |
raw_display = raw_display[['Player', 'Position', 'Team', 'Opp', 'Minutes', '3P', 'Points', 'Rebounds', 'Assists', 'Steals', 'Blocks', 'Turnovers', 'Fantasy']]
|
| 63 |
player_stats = raw_display[raw_display['Minutes'] > 0]
|
| 64 |
+
|
| 65 |
+
player_stats['Player'].replace(['Jaren Jackson', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort'],
|
| 66 |
+
['Jaren Jackson Jr.', 'Nic Claxton', 'Jabari Smith', 'Lu Dort'], inplace=True)
|
| 67 |
|
| 68 |
worksheet = sh.worksheet('Timestamp')
|
| 69 |
timestamp = worksheet.acell('A1').value
|
|
|
|
| 73 |
raw_display.replace('', np.nan, inplace=True)
|
| 74 |
prop_frame = raw_display.dropna(subset='Player')
|
| 75 |
|
| 76 |
+
prop_frame['Player'].replace(['Jaren Jackson', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort'],
|
| 77 |
+
['Jaren Jackson Jr.', 'Nic Claxton', 'Jabari Smith', 'Lu Dort'], inplace=True)
|
| 78 |
+
|
| 79 |
return game_model, player_stats, prop_frame, timestamp
|
| 80 |
|
| 81 |
def convert_df_to_csv(df):
|