James McCool commited on
Commit
cf9d108
·
1 Parent(s): 6244ceb

Enhance player data display in app.py by introducing individual player tabs. Each tab presents player-specific statistics, including percentiles for various metrics, improving the user experience and allowing for a more detailed analysis of player performance. This update builds on previous enhancements to statistical projections and opponent performance metrics.

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -352,4 +352,14 @@ if st.button("Run"):
352
  with tab2:
353
  st.dataframe(opp_boost.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
354
 
355
- st.dataframe(sim_df.style.format(precision=2), use_container_width=True)
 
 
 
 
 
 
 
 
 
 
 
352
  with tab2:
353
  st.dataframe(opp_boost.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
354
 
355
+ unique_players = sim_df['Player'].unique()
356
+ player_tabs = st.tabs(unique_players)
357
+
358
+ for player, tab in zip(unique_players, player_tabs):
359
+ with tab:
360
+ player_data = sim_df[sim_df['Player'] == player]
361
+ st.dataframe(
362
+ player_data[['Stat', '10%', '25%', '50%', '75%', '90%']]
363
+ .style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2),
364
+ use_container_width=True
365
+ )