James McCool commited on
Commit
b31d7a5
·
1 Parent(s): 066bff1

Refine DataFrame styling with improved font size and readability

Browse files

- Update Streamlit DataFrame styling to use table styles
- Set specific font sizes for table cells and headers
- Maintain consistent and readable data presentation

Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -188,7 +188,14 @@ with tab1:
188
  elif type_var == "Showdown":
189
  display = display[['Player', 'Salary', 'Median', '5x%', 'Own']]
190
  display = display.set_index('Player')
191
- st.dataframe(display.style.set_properties(**{'font-size': '4pt'}).background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
 
 
 
 
 
 
 
192
  elif view_var == "Advanced":
193
  display = display
194
  display = display.set_index('Player')
 
188
  elif type_var == "Showdown":
189
  display = display[['Player', 'Salary', 'Median', '5x%', 'Own']]
190
  display = display.set_index('Player')
191
+ st.dataframe(display.style
192
+ .background_gradient(axis=0)
193
+ .background_gradient(cmap='RdYlGn')
194
+ .format(player_roo_format, precision=2)
195
+ .set_table_styles([
196
+ {'selector': 'td', 'props': [('font-size', '14px')]},
197
+ {'selector': 'th', 'props': [('font-size', '15px')]}
198
+ ]), height=750, use_container_width = True)
199
  elif view_var == "Advanced":
200
  display = display
201
  display = display.set_index('Player')