James McCool commited on
Commit
7ee528b
·
1 Parent(s): 361017e

Adjust DataFrame styling with custom font size parameter

Browse files

- Add font_size parameter to DataFrame styling method
- Remove redundant CSS selector for DataFrame font size
- Maintain consistent data table readability with explicit font sizing

Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -58,10 +58,6 @@ st.markdown("""
58
  background-color: #DAA520;
59
  cursor: pointer;
60
  }
61
-
62
- .stTabs [data-testid="stDataFrameResizable"] {
63
- font-size: 1em;
64
- }
65
  </style>""", unsafe_allow_html=True)
66
 
67
  @st.cache_resource(ttl = 60)
@@ -192,11 +188,11 @@ with tab1:
192
  elif type_var == "Showdown":
193
  display = display[['Player', 'Salary', 'Median', '5x%', 'Own']]
194
  display = display.set_index('Player')
195
- st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
196
  elif view_var == "Advanced":
197
  display = display
198
  display = display.set_index('Player')
199
- st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
200
 
201
  st.download_button(
202
  label="Export Projections",
 
58
  background-color: #DAA520;
59
  cursor: pointer;
60
  }
 
 
 
 
61
  </style>""", unsafe_allow_html=True)
62
 
63
  @st.cache_resource(ttl = 60)
 
188
  elif type_var == "Showdown":
189
  display = display[['Player', 'Salary', 'Median', '5x%', 'Own']]
190
  display = display.set_index('Player')
191
+ st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2, font_size=8), height=750, use_container_width = True)
192
  elif view_var == "Advanced":
193
  display = display
194
  display = display.set_index('Player')
195
+ st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2, font_size=8), height=750, use_container_width = True)
196
 
197
  st.download_button(
198
  label="Export Projections",