Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -90,6 +90,7 @@ def init_baselines():
|
|
90 |
data_cols = ['PG', 'SG', 'SF', 'PF', 'C']
|
91 |
rot_table[data_cols] = rot_table[data_cols].apply(pd.to_numeric, errors='coerce')
|
92 |
|
|
|
93 |
return gamelog_table, rot_table
|
94 |
|
95 |
@st.cache_data(show_spinner=False)
|
@@ -204,6 +205,8 @@ season_data_cols = ['Touches', 'Touch/Min', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
|
204 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
205 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
206 |
total_teams = indv_teams.Team.values.tolist()
|
|
|
|
|
207 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
208 |
total_players = indv_players.Player.values.tolist()
|
209 |
total_dates = gamelog_table.Date.values.tolist()
|
@@ -228,6 +231,8 @@ with tab1:
|
|
228 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
229 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
230 |
total_teams = indv_teams.Team.values.tolist()
|
|
|
|
|
231 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
232 |
total_players = indv_players.Player.values.tolist()
|
233 |
total_dates = gamelog_table.Date.values.tolist()
|
@@ -344,6 +349,8 @@ with tab2:
|
|
344 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
345 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
346 |
total_teams = indv_teams.Team.values.tolist()
|
|
|
|
|
347 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
348 |
total_players = indv_players.Player.values.tolist()
|
349 |
total_dates = gamelog_table.Date.values.tolist()
|
@@ -426,6 +433,8 @@ with tab3:
|
|
426 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
427 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
428 |
total_teams = indv_teams.Team.values.tolist()
|
|
|
|
|
429 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
430 |
total_players = indv_players.Player.values.tolist()
|
431 |
total_dates = gamelog_table.Date.values.tolist()
|
@@ -502,11 +511,13 @@ with tab4:
|
|
502 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
503 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
504 |
total_teams = indv_teams.Team.values.tolist()
|
|
|
|
|
505 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
506 |
total_players = indv_players.Player.values.tolist()
|
507 |
total_dates = gamelog_table.Date.values.tolist()
|
508 |
|
509 |
-
team_var4 = st.selectbox('Which team would you like to view?', options =
|
510 |
|
511 |
with col2:
|
512 |
working_data = rot_table
|
|
|
90 |
data_cols = ['PG', 'SG', 'SF', 'PF', 'C']
|
91 |
rot_table[data_cols] = rot_table[data_cols].apply(pd.to_numeric, errors='coerce')
|
92 |
|
93 |
+
|
94 |
return gamelog_table, rot_table
|
95 |
|
96 |
@st.cache_data(show_spinner=False)
|
|
|
205 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
206 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
207 |
total_teams = indv_teams.Team.values.tolist()
|
208 |
+
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
209 |
+
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
210 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
211 |
total_players = indv_players.Player.values.tolist()
|
212 |
total_dates = gamelog_table.Date.values.tolist()
|
|
|
231 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
232 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
233 |
total_teams = indv_teams.Team.values.tolist()
|
234 |
+
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
235 |
+
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
236 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
237 |
total_players = indv_players.Player.values.tolist()
|
238 |
total_dates = gamelog_table.Date.values.tolist()
|
|
|
349 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
350 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
351 |
total_teams = indv_teams.Team.values.tolist()
|
352 |
+
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
353 |
+
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
354 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
355 |
total_players = indv_players.Player.values.tolist()
|
356 |
total_dates = gamelog_table.Date.values.tolist()
|
|
|
433 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
434 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
435 |
total_teams = indv_teams.Team.values.tolist()
|
436 |
+
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
437 |
+
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
438 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
439 |
total_players = indv_players.Player.values.tolist()
|
440 |
total_dates = gamelog_table.Date.values.tolist()
|
|
|
511 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
512 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
513 |
total_teams = indv_teams.Team.values.tolist()
|
514 |
+
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
515 |
+
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
516 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
517 |
total_players = indv_players.Player.values.tolist()
|
518 |
total_dates = gamelog_table.Date.values.tolist()
|
519 |
|
520 |
+
team_var4 = st.selectbox('Which team would you like to view?', options = total_rot_teams, key='team_var4')
|
521 |
|
522 |
with col2:
|
523 |
working_data = rot_table
|