Multichem commited on
Commit
35d5bc3
·
verified ·
1 Parent(s): 3b34f93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -239,27 +239,27 @@ with col2:
239
  if stat_var1 == 'True AVG Splits':
240
  pitcher_stats = True_AVG_Splits_load()
241
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
242
- pitcher_stats = pitcher_stats.set_index('Player')
243
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn_r').format(precision=3), use_container_width = True)
244
  if stat_var1 == 'HWSr Splits':
245
  pitcher_stats = HWSr_Splits_load()
246
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
247
- pitcher_stats = pitcher_stats.set_index('Player')
248
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn_r').format(precision=3), use_container_width = True)
249
  elif stat_var1 == 'Current Slate Stats':
250
  pitcher_stats = SP_Slate_Stats_load()
251
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
252
- pitcher_stats = pitcher_stats.set_index('Player')
253
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn_r').background_gradient(cmap='RdYlGn', subset='K%').format(SP_format, precision=2), use_container_width = True)
254
  elif stat_var1 == 'Stats vs. RHH':
255
  pitcher_stats = RHH_load()
256
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
257
- pitcher_stats = pitcher_stats.set_index('Names')
258
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r', subset=['Opp RHH', 'Salary', 'BB%', 'True AVG', 'xSLG', 'xBA', 'Hits', 'Homeruns', 'xHRs', 'xHR/PA']).background_gradient(cmap='RdYlGn', subset='K%').format(SP_format, precision=2), use_container_width = True)
259
  elif stat_var1 == 'Stats vs. LHH':
260
  pitcher_stats = LHH_load()
261
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
262
- pitcher_stats = pitcher_stats.set_index('Names')
263
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r', subset=['Opp LHH', 'Salary', 'BB%', 'True AVG', 'xSLG', 'xBA', 'Hits', 'Homeruns', 'xHRs', 'xHR/PA']).background_gradient(cmap='RdYlGn', subset='K%').format(SP_format, precision=2), use_container_width = True)
264
  elif stat_var1 == 'Full League Stats':
265
  pitcher_stats = Full_Stats_load()
@@ -273,7 +273,7 @@ with col2:
273
  elif stat_var1 == 'Bullpen Data':
274
  pitcher_stats = Bullpen_Data_load()
275
  pitcher_stats = pitcher_stats[pitcher_stats['Names'].isin(sp_var1)]
276
- pitcher_stats = pitcher_stats.set_index('Names')
277
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r').background_gradient(cmap='RdYlGn', subset=['Strikeoutper', 'Strikeouts', 'PA']).format(precision=0).format(precision=3, subset = BP_league_format), use_container_width = True)
278
  elif stat_type_var1 == 'Hitters':
279
  if stat_var1 == 'Current Slate Player Stats':
 
239
  if stat_var1 == 'True AVG Splits':
240
  pitcher_stats = True_AVG_Splits_load()
241
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
242
+ #pitcher_stats = pitcher_stats.set_index('Player')
243
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn_r').format(precision=3), use_container_width = True)
244
  if stat_var1 == 'HWSr Splits':
245
  pitcher_stats = HWSr_Splits_load()
246
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
247
+ #pitcher_stats = pitcher_stats.set_index('Player')
248
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn_r').format(precision=3), use_container_width = True)
249
  elif stat_var1 == 'Current Slate Stats':
250
  pitcher_stats = SP_Slate_Stats_load()
251
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
252
+ #pitcher_stats = pitcher_stats.set_index('Player')
253
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn_r').background_gradient(cmap='RdYlGn', subset='K%').format(SP_format, precision=2), use_container_width = True)
254
  elif stat_var1 == 'Stats vs. RHH':
255
  pitcher_stats = RHH_load()
256
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
257
+ #pitcher_stats = pitcher_stats.set_index('Names')
258
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r', subset=['Opp RHH', 'Salary', 'BB%', 'True AVG', 'xSLG', 'xBA', 'Hits', 'Homeruns', 'xHRs', 'xHR/PA']).background_gradient(cmap='RdYlGn', subset='K%').format(SP_format, precision=2), use_container_width = True)
259
  elif stat_var1 == 'Stats vs. LHH':
260
  pitcher_stats = LHH_load()
261
  pitcher_stats = pitcher_stats[pitcher_stats['Team'].isin(sp_var1)]
262
+ #pitcher_stats = pitcher_stats.set_index('Names')
263
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r', subset=['Opp LHH', 'Salary', 'BB%', 'True AVG', 'xSLG', 'xBA', 'Hits', 'Homeruns', 'xHRs', 'xHR/PA']).background_gradient(cmap='RdYlGn', subset='K%').format(SP_format, precision=2), use_container_width = True)
264
  elif stat_var1 == 'Full League Stats':
265
  pitcher_stats = Full_Stats_load()
 
273
  elif stat_var1 == 'Bullpen Data':
274
  pitcher_stats = Bullpen_Data_load()
275
  pitcher_stats = pitcher_stats[pitcher_stats['Names'].isin(sp_var1)]
276
+ #pitcher_stats = pitcher_stats.set_index('Names')
277
  st.dataframe(pitcher_stats.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r').background_gradient(cmap='RdYlGn', subset=['Strikeoutper', 'Strikeouts', 'PA']).format(precision=0).format(precision=3, subset = BP_league_format), use_container_width = True)
278
  elif stat_type_var1 == 'Hitters':
279
  if stat_var1 == 'Current Slate Player Stats':