James McCool commited on
Commit
1112aee
·
1 Parent(s): 559a96d

Update game_format and add subscription notice for additional scoring columns in Advanced view

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -16,8 +16,7 @@ def init_conn():
16
 
17
  db = init_conn()
18
 
19
- game_format = {'Win%': '{:.2%}','First Inning Lead Percentage': '{:.2%}', 'Top Score': '{:.2%}',
20
- 'Fifth Inning Lead Percentage': '{:.2%}', '8+ Runs': '{:.2%}', 'LevX': '{:.2%}'}
21
 
22
  player_roo_format = {'Top_finish': '{:.2%}','Top_5_finish': '{:.2%}', 'Top_10_finish': '{:.2%}', '20+%': '{:.2%}', '2x%': '{:.2%}', '3x%': '{:.2%}',
23
  '4x%': '{:.2%}'}
@@ -361,6 +360,8 @@ with tab1:
361
  scoring_percentages[col] = '$$ (subscription only)'
362
  st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), height=750, use_container_width = True)
363
  elif view_var == "Advanced":
 
 
364
  scoring_percentages = scoring_percentages.set_index('Names', drop=True)
365
  st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), height=750, use_container_width = True)
366
 
 
16
 
17
  db = init_conn()
18
 
19
+ game_format = {'Win%': '{:.2%}','First Inning Lead Percentage': '{:.2%}'}
 
20
 
21
  player_roo_format = {'Top_finish': '{:.2%}','Top_5_finish': '{:.2%}', 'Top_10_finish': '{:.2%}', '20+%': '{:.2%}', '2x%': '{:.2%}', '3x%': '{:.2%}',
22
  '4x%': '{:.2%}'}
 
360
  scoring_percentages[col] = '$$ (subscription only)'
361
  st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), height=750, use_container_width = True)
362
  elif view_var == "Advanced":
363
+ for col in ['Avg Fifth Inning', 'Fifth Inning Lead Percentage', 'Top Score', '8+ Runs', 'LevX', 'Own%']:
364
+ scoring_percentages[col] = '$$ (subscription only)'
365
  scoring_percentages = scoring_percentages.set_index('Names', drop=True)
366
  st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), height=750, use_container_width = True)
367