Multichem commited on
Commit
11f977f
·
1 Parent(s): 85337cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,8 +60,8 @@ def init_baselines():
60
  raw_display = raw_display.reset_index(drop=True)
61
  raw_display.replace('', np.nan, inplace=True)
62
  raw_display = raw_display.apply(pd.to_numeric, errors='coerce').fillna(raw_display)
63
- raw_display['Team Date'] = raw_display['Team'] + " " + raw_display['Date'].astype(str)
64
  game_model = raw_display[raw_display['Date'] != ""]
 
65
 
66
  worksheet = sh.worksheet('SeasonExport')
67
  raw_display = pd.DataFrame(worksheet.get_values())
@@ -89,9 +89,9 @@ with tab1:
89
  if split_var1 == 'Specific Teams':
90
  team_var1 = st.multiselect('Which teams would you like to include in the tables?', options = game_model['Team'].unique(), key='team_var1')
91
  elif split_var1 == 'All':
92
- team_var1 = game_model.Team.values.tolist()
93
  game_model = game_model[game_model['Team'].isin(team_var1)]
94
- game_display = game_model.set_index('Team')
95
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
96
  st.download_button(
97
  label="Export Game Model",
 
60
  raw_display = raw_display.reset_index(drop=True)
61
  raw_display.replace('', np.nan, inplace=True)
62
  raw_display = raw_display.apply(pd.to_numeric, errors='coerce').fillna(raw_display)
 
63
  game_model = raw_display[raw_display['Date'] != ""]
64
+ game_model['Team Date'] = game_model['Team'] + " " + game_model['Date'].astype(str)
65
 
66
  worksheet = sh.worksheet('SeasonExport')
67
  raw_display = pd.DataFrame(worksheet.get_values())
 
89
  if split_var1 == 'Specific Teams':
90
  team_var1 = st.multiselect('Which teams would you like to include in the tables?', options = game_model['Team'].unique(), key='team_var1')
91
  elif split_var1 == 'All':
92
+ team_var1 = game_model.TC.values.tolist()
93
  game_model = game_model[game_model['Team'].isin(team_var1)]
94
+ game_display = game_model.set_index('Team Date')
95
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
96
  st.download_button(
97
  label="Export Game Model",