Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -62,8 +62,9 @@ def init_baselines():
|
|
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', 'Nic Claxton', 'Jabari Smith', 'Lu Dort', 'Moe Wagner', 'Kyle Kuzma', 'Trey Murphy'],
|
66 |
-
['Jaren Jackson Jr.', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort', 'Moritz Wagner', 'Kyle Kuzma Jr.',
|
|
|
67 |
|
68 |
worksheet = sh.worksheet('Timestamp')
|
69 |
timestamp = worksheet.acell('A1').value
|
@@ -78,10 +79,12 @@ def init_baselines():
|
|
78 |
raw_display.replace('', np.nan, inplace=True)
|
79 |
pick_frame = raw_display.dropna(subset='Player')
|
80 |
|
81 |
-
prop_frame['Player'].replace(['Jaren Jackson', 'Nic Claxton', 'Jabari Smith', 'Lu Dort', 'Moe Wagner', 'Kyle Kuzma', 'Trey Murphy'],
|
82 |
-
['Jaren Jackson Jr.', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort', 'Moritz Wagner', 'Kyle Kuzma Jr.',
|
83 |
-
|
84 |
-
|
|
|
|
|
85 |
return game_model, player_stats, prop_frame, pick_frame, timestamp
|
86 |
|
87 |
def convert_df_to_csv(df):
|
|
|
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', 'Nic Claxton', 'Jabari Smith', 'Lu Dort', 'Moe Wagner', 'Kyle Kuzma', 'Trey Murphy', 'Cameron Thomas'],
|
66 |
+
['Jaren Jackson Jr.', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort', 'Moritz Wagner', 'Kyle Kuzma Jr.',
|
67 |
+
'Trey Murphy III', 'Cam Thomas'], inplace=True)
|
68 |
|
69 |
worksheet = sh.worksheet('Timestamp')
|
70 |
timestamp = worksheet.acell('A1').value
|
|
|
79 |
raw_display.replace('', np.nan, inplace=True)
|
80 |
pick_frame = raw_display.dropna(subset='Player')
|
81 |
|
82 |
+
prop_frame['Player'].replace(['Jaren Jackson', 'Nic Claxton', 'Jabari Smith', 'Lu Dort', 'Moe Wagner', 'Kyle Kuzma', 'Trey Murphy', 'Cameron Thomas'],
|
83 |
+
['Jaren Jackson Jr.', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort', 'Moritz Wagner', 'Kyle Kuzma Jr.',
|
84 |
+
'Trey Murphy III', 'Cam Thomas'], inplace=True)
|
85 |
+
pick_frame['Player'].replace(['Jaren Jackson', 'Nic Claxton', 'Jabari Smith', 'Lu Dort', 'Moe Wagner', 'Kyle Kuzma', 'Trey Murphy', 'Cameron Thomas'],
|
86 |
+
['Jaren Jackson Jr.', 'Nicolas Claxton', 'Jabari Smith Jr.', 'Luguentz Dort', 'Moritz Wagner', 'Kyle Kuzma Jr.',
|
87 |
+
'Trey Murphy III', 'Cam Thomas'], inplace=True)
|
88 |
return game_model, player_stats, prop_frame, pick_frame, timestamp
|
89 |
|
90 |
def convert_df_to_csv(df):
|