James McCool
commited on
Commit
·
353cf78
1
Parent(s):
b67c4a9
Update portfolio dataframe condition in app.py to use session state directly
Browse files- Modified the condition for displaying 'portfolio_df' to directly reference st.session_state, ensuring accurate checks for data availability.
- This change enhances the robustness of the application by preventing potential errors related to null handling and improving user experience.
app.py
CHANGED
@@ -216,7 +216,7 @@ with tab1:
|
|
216 |
pass
|
217 |
st.write('Contest data:')
|
218 |
st.dataframe(st.session_state['Contest'].head(25))
|
219 |
-
if 'portfolio_df' is not None:
|
220 |
st.write('Portfolio data:')
|
221 |
st.dataframe(st.session_state['portfolio_df'].head(25))
|
222 |
else:
|
|
|
216 |
pass
|
217 |
st.write('Contest data:')
|
218 |
st.dataframe(st.session_state['Contest'].head(25))
|
219 |
+
if st.session_state['portfolio_df'] is not None:
|
220 |
st.write('Portfolio data:')
|
221 |
st.dataframe(st.session_state['portfolio_df'].head(25))
|
222 |
else:
|