Multichem commited on
Commit
fcb4a09
·
1 Parent(s): c8f5b0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -98,8 +98,14 @@ with tab1:
98
  team_var1 = st.multiselect('Which teams would you like to include in the tables?', options = game_model['Team'].unique(), key='team_var1')
99
  elif split_var1 == 'All':
100
  team_var1 = game_model.Team.values.tolist()
101
- game_model = game_model[game_model['Team'].isin(team_var1)]
102
- game_display = game_model.set_index('Team Date')
 
 
 
 
 
 
103
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
104
  st.download_button(
105
  label="Export Game Model",
 
98
  team_var1 = st.multiselect('Which teams would you like to include in the tables?', options = game_model['Team'].unique(), key='team_var1')
99
  elif split_var1 == 'All':
100
  team_var1 = game_model.Team.values.tolist()
101
+ date_split_var1 = st.radio("Would you like to view all Dates or specific ones?", ('All', 'Specific Dates'), key='date_split_var1')
102
+ if date_split_var1 == 'Specific Teams':
103
+ date_var1 = st.multiselect('Which Dates would you like to include in the tables?', options = game_model['Date'].unique(), key='date_var1')
104
+ elif date_split_var1 == 'All':
105
+ date_var1 = game_model.Date.values.tolist()
106
+ game_display = game_model[game_model['Team'].isin(team_var1)]
107
+ game_display = game_display[game_display['Date'].isin(date_var1)]
108
+ game_display = game_display.set_index('Team Date')
109
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
110
  st.download_button(
111
  label="Export Game Model",