Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -326,7 +326,7 @@ with col2:
|
|
| 326 |
hitter_stats = hitter_stats.sort_values(by='Trending Score', ascending=False)
|
| 327 |
hitter_stats = hitter_stats.set_index('Team')
|
| 328 |
hitter_stats = hitter_stats[hitter_stats['Acro'].isin(team_var1)]
|
| 329 |
-
st.dataframe(hitter_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(offense_format, precision=2), use_container_width = True)
|
| 330 |
elif stat_var1 == 'Team Trending Stats (Defense)':
|
| 331 |
hitter_stats = load_table(data_hold, 'Macro_Trending')
|
| 332 |
hitter_stats.apply(pd.to_numeric, errors='ignore')
|
|
@@ -347,7 +347,7 @@ with col2:
|
|
| 347 |
hitter_stats = hitter_stats.sort_values(by='Trending Avg Allowed', ascending=False)
|
| 348 |
hitter_stats = hitter_stats.set_index('Team')
|
| 349 |
hitter_stats = hitter_stats[hitter_stats['Acro'].isin(team_var1)]
|
| 350 |
-
st.dataframe(hitter_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(defense_format, precision=2), use_container_width = True)
|
| 351 |
elif stat_var1 == 'Team Trending Stats (Matchup ELO)':
|
| 352 |
hitter_stats = load_table(data_hold, 'Macro_Trending')
|
| 353 |
hitter_stats.apply(pd.to_numeric, errors='ignore')
|
|
@@ -365,7 +365,7 @@ with col2:
|
|
| 365 |
hitter_stats = hitter_stats.sort_values(by='R2_to_Opp_Trend', ascending=False)
|
| 366 |
hitter_stats = hitter_stats.set_index('Team')
|
| 367 |
hitter_stats = hitter_stats[hitter_stats['Acro'].isin(team_var1)]
|
| 368 |
-
st.dataframe(hitter_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(R2_format, precision=2), use_container_width = True)
|
| 369 |
if stat_type_var1 == 'Pitchers':
|
| 370 |
st.download_button(
|
| 371 |
label="Export Tables",
|
|
|
|
| 326 |
hitter_stats = hitter_stats.sort_values(by='Trending Score', ascending=False)
|
| 327 |
hitter_stats = hitter_stats.set_index('Team')
|
| 328 |
hitter_stats = hitter_stats[hitter_stats['Acro'].isin(team_var1)]
|
| 329 |
+
st.dataframe(hitter_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(offense_format, precision=2), height=1200, use_container_width = True)
|
| 330 |
elif stat_var1 == 'Team Trending Stats (Defense)':
|
| 331 |
hitter_stats = load_table(data_hold, 'Macro_Trending')
|
| 332 |
hitter_stats.apply(pd.to_numeric, errors='ignore')
|
|
|
|
| 347 |
hitter_stats = hitter_stats.sort_values(by='Trending Avg Allowed', ascending=False)
|
| 348 |
hitter_stats = hitter_stats.set_index('Team')
|
| 349 |
hitter_stats = hitter_stats[hitter_stats['Acro'].isin(team_var1)]
|
| 350 |
+
st.dataframe(hitter_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(defense_format, precision=2), height=1200, use_container_width = True)
|
| 351 |
elif stat_var1 == 'Team Trending Stats (Matchup ELO)':
|
| 352 |
hitter_stats = load_table(data_hold, 'Macro_Trending')
|
| 353 |
hitter_stats.apply(pd.to_numeric, errors='ignore')
|
|
|
|
| 365 |
hitter_stats = hitter_stats.sort_values(by='R2_to_Opp_Trend', ascending=False)
|
| 366 |
hitter_stats = hitter_stats.set_index('Team')
|
| 367 |
hitter_stats = hitter_stats[hitter_stats['Acro'].isin(team_var1)]
|
| 368 |
+
st.dataframe(hitter_stats.style.background_gradient(axis=0).background_gradient(cmap = 'RdYlGn').format(R2_format, precision=2), height=1200, use_container_width = True)
|
| 369 |
if stat_type_var1 == 'Pitchers':
|
| 370 |
st.download_button(
|
| 371 |
label="Export Tables",
|