Multichem commited on
Commit
55e756a
·
1 Parent(s): 18e007c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -89,7 +89,7 @@ def init_baselines():
89
  rot_table = rot_table[['Player', 'Team', 'PG', 'SG', 'SF', 'PF', 'C', 'Given Pos']]
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
 
@@ -520,7 +520,7 @@ with tab4:
520
  split_var5 = st.radio("Would you like to view all teams or specific ones?", ('All', 'Specific Teams'), key='split_var5')
521
 
522
  if split_var5 == 'Specific Teams':
523
- team_var4 = st.selectbox('Which team would you like to view?', options = total_rot_teams, key='team_var4')
524
  elif split_var5 == 'All':
525
  team_var4 = total_rot_teams
526
 
@@ -530,7 +530,7 @@ with tab4:
530
  rot_display = working_data[working_data['Team'].isin(team_var4)]
531
  display = st.container()
532
 
533
- # rot_display = rot_display.set_index('Player')
534
  display.dataframe(rot_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(percentages_format, precision=2), height=500, use_container_width=True)
535
  st.download_button(
536
  label="Export Rotations Model",
 
89
  rot_table = rot_table[['Player', 'Team', 'PG', 'SG', 'SF', 'PF', 'C', 'Given Pos']]
90
  data_cols = ['PG', 'SG', 'SF', 'PF', 'C']
91
  rot_table[data_cols] = rot_table[data_cols].apply(pd.to_numeric, errors='coerce')
92
+ rot_table = rot_table[rot_table['Player'] != 0]
93
 
94
  return gamelog_table, rot_table
95
 
 
520
  split_var5 = st.radio("Would you like to view all teams or specific ones?", ('All', 'Specific Teams'), key='split_var5')
521
 
522
  if split_var5 == 'Specific Teams':
523
+ team_var4 = st.multiselect('Which teams would you like to view?', options = total_rot_teams, key='team_var4')
524
  elif split_var5 == 'All':
525
  team_var4 = total_rot_teams
526
 
 
530
  rot_display = working_data[working_data['Team'].isin(team_var4)]
531
  display = st.container()
532
 
533
+ rot_display = rot_display.set_index('Player')
534
  display.dataframe(rot_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(percentages_format, precision=2), height=500, use_container_width=True)
535
  st.download_button(
536
  label="Export Rotations Model",