Multichem commited on
Commit
df3f181
·
1 Parent(s): c02ae1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -109,10 +109,12 @@ with tab2:
109
  team_var2 = st.multiselect('Which teams would you like to include in the tables?', options = season_model['Team'].unique(), key='team_var2')
110
  elif split_var2 == 'All':
111
  team_var2 = season_model.Team.values.tolist()
112
- # season_model = season_model[season_model['Team'].isin(team_var2)]
113
- # season_display = season_model.set_index('Team')
114
- # season_display = season_display.sort_values(by=['Win Projection Now'], ascending=False)
115
- st.write(season_model, use_container_width = True)
 
 
116
  st.download_button(
117
  label="Export Futures Model",
118
  data=convert_df_to_csv(season_model),
 
109
  team_var2 = st.multiselect('Which teams would you like to include in the tables?', options = season_model['Team'].unique(), key='team_var2')
110
  elif split_var2 == 'All':
111
  team_var2 = season_model.Team.values.tolist()
112
+ season_model = season_model[season_model['Team'].isin(team_var2)]
113
+ season_display = season_model.set_index('Team')
114
+ season_display = season_display.sort_values(by=['Win Projection Now'], ascending=False)
115
+ for col in season_display.columns:
116
+ print(col)
117
+ st.dataframe(season_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
118
  st.download_button(
119
  label="Export Futures Model",
120
  data=convert_df_to_csv(season_model),