Update app.py
Browse files
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 |
-
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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",
|