James McCool commited on
Commit
40731d9
·
1 Parent(s): c256b63

Enhance dataframe styling in Streamlit app for better visual clarity

Browse files

- Updated the background gradient for the pitcher dataframe to use a reversed color map and applied specific gradient formatting to key statistics.
- Improved overall readability and visual appeal of the displayed data in the pitcher tab.

Files changed (1) hide show
  1. src/streamlit_app.py +1 -1
src/streamlit_app.py CHANGED
@@ -145,7 +145,7 @@ with pitcher_tab:
145
  sp_disp_container = sp_disp_container.empty()
146
 
147
  with sp_disp_container:
148
- st.dataframe(st.session_state['sp_disp_frame'].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True, hide_index = True)
149
 
150
  with hitter_tab:
151
  with st.expander('Info and Display Options'):
 
145
  sp_disp_container = sp_disp_container.empty()
146
 
147
  with sp_disp_container:
148
+ st.dataframe(st.session_state['sp_disp_frame'].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r').background_gradient(cmap='RdYlGn', subset=['Strikeoutper', 'Strikeouts', 'K%']).format(precision=2), use_container_width = True, hide_index = True)
149
 
150
  with hitter_tab:
151
  with st.expander('Info and Display Options'):