James McCool
commited on
Commit
·
a14225c
1
Parent(s):
24f22a7
Enhance dataframe styling in app.py
Browse files- Improved the dataframe display for general exposures by adding precision formatting and a background gradient for the 'dupes' subset, enhancing visual clarity.
- Ensured consistent styling across different entry selections, maintaining the overall functionality of the application.
app.py
CHANGED
|
@@ -293,11 +293,15 @@ 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(cmap='RdYlGn', axis=1)
|
|
|
|
|
|
|
| 297 |
hide_index=True)
|
| 298 |
else:
|
| 299 |
st.session_state['general_frame'] = create_general_exposures(working_df, entry_names)
|
| 300 |
st.dataframe(st.session_state['general_frame'].
|
| 301 |
-
style.background_gradient(cmap='RdYlGn', axis=1)
|
|
|
|
|
|
|
| 302 |
hide_index=True)
|
| 303 |
|
|
|
|
| 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(cmap='RdYlGn', axis=1).
|
| 297 |
+
background_gradient(cmap='RdYlGn_r', subset=['dupes'], axis=1).
|
| 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(cmap='RdYlGn', axis=1).
|
| 304 |
+
background_gradient(cmap='RdYlGn_r', subset=['dupes'], axis=1).
|
| 305 |
+
format(precision=2),
|
| 306 |
hide_index=True)
|
| 307 |
|