Spaces:
Running
Running
James McCool
commited on
Commit
·
40212a7
1
Parent(s):
d3a2a85
Refactor display logic in app.py: streamline the conditional rendering of the project display by removing unnecessary container usage, enhancing code clarity and maintaining functionality for filtering based on position selection.
Browse files
app.py
CHANGED
@@ -486,15 +486,13 @@ with tab1:
|
|
486 |
mime='text/csv',
|
487 |
)
|
488 |
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
st.dataframe(st.session_state.display_proj.style.set_properties(**{'font-size': '6pt'}).background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(roo_format, precision=2),
|
497 |
-
height=1000, use_container_width = True)
|
498 |
|
499 |
|
500 |
|
|
|
486 |
mime='text/csv',
|
487 |
)
|
488 |
|
489 |
+
if 'display_proj' in st.session_state:
|
490 |
+
if pos_var2 == 'All':
|
491 |
+
st.session_state.display_proj = st.session_state.display_proj
|
492 |
+
elif pos_var2 != 'All':
|
493 |
+
st.session_state.display_proj = st.session_state.display_proj[st.session_state.display_proj['Position'].str.contains(pos_var2)]
|
494 |
+
st.dataframe(st.session_state.display_proj.style.set_properties(**{'font-size': '6pt'}).background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(roo_format, precision=2),
|
495 |
+
height=1000, use_container_width = True)
|
|
|
|
|
496 |
|
497 |
|
498 |
|