James McCool
commited on
Commit
·
80a823d
1
Parent(s):
a14225c
Refine dataframe styling in app.py
Browse files- Updated the background gradient application for the dataframe display, ensuring consistent styling across different entry selections.
- Enhanced visual clarity by adjusting the gradient methods and maintaining precision formatting for better data presentation.
app.py
CHANGED
|
@@ -293,15 +293,17 @@ with tab2:
|
|
| 293 |
if entry_parse_var == 'All':
|
| 294 |
st.session_state['general_frame'] = create_general_exposures(working_df)
|
| 295 |
st.dataframe(st.session_state['general_frame'].
|
| 296 |
-
style.background_gradient(
|
| 297 |
-
background_gradient(cmap='
|
|
|
|
| 298 |
format(precision=2),
|
| 299 |
hide_index=True)
|
| 300 |
else:
|
| 301 |
st.session_state['general_frame'] = create_general_exposures(working_df, entry_names)
|
| 302 |
st.dataframe(st.session_state['general_frame'].
|
| 303 |
-
style.background_gradient(
|
| 304 |
-
background_gradient(cmap='
|
|
|
|
| 305 |
format(precision=2),
|
| 306 |
hide_index=True)
|
| 307 |
|
|
|
|
| 293 |
if entry_parse_var == 'All':
|
| 294 |
st.session_state['general_frame'] = create_general_exposures(working_df)
|
| 295 |
st.dataframe(st.session_state['general_frame'].
|
| 296 |
+
style.background_gradient(axis=1).
|
| 297 |
+
background_gradient(cmap='RdYlGn').
|
| 298 |
+
background_gradient(cmap='RdYlGn_r', subset='dupes').
|
| 299 |
format(precision=2),
|
| 300 |
hide_index=True)
|
| 301 |
else:
|
| 302 |
st.session_state['general_frame'] = create_general_exposures(working_df, entry_names)
|
| 303 |
st.dataframe(st.session_state['general_frame'].
|
| 304 |
+
style.background_gradient(axis=1).
|
| 305 |
+
background_gradient(cmap='RdYlGn').
|
| 306 |
+
background_gradient(cmap='RdYlGn_r', subset='dupes').
|
| 307 |
format(precision=2),
|
| 308 |
hide_index=True)
|
| 309 |
|