James McCool
commited on
Commit
·
c300f43
1
Parent(s):
51b03c3
Update app.py: temporarily add an info message for ongoing work on the export feature, and simplify display logic by directly using the portfolio state while commenting out the selectbox for display options.
Browse files
app.py
CHANGED
@@ -1106,16 +1106,18 @@ with tab2:
|
|
1106 |
with download_port:
|
1107 |
st.download_button(label="Download Portfolio", data=st.session_state['export_file'].to_csv(index=False), file_name="portfolio.csv", mime="text/csv")
|
1108 |
with merge_port:
|
|
|
1109 |
if st.button("Add to export"):
|
1110 |
st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge']])
|
1111 |
else:
|
1112 |
st.error("No portfolio to download")
|
1113 |
|
1114 |
-
display_frame_source = st.selectbox("Display:", options=['Portfolio', 'Export Base'], key='display_frame_source')
|
1115 |
-
if display_frame_source == 'Portfolio':
|
1116 |
-
|
1117 |
-
elif display_frame_source == 'Export Base':
|
1118 |
-
|
|
|
1119 |
total_rows = len(display_frame)
|
1120 |
rows_per_page = 500
|
1121 |
total_pages = (total_rows + rows_per_page - 1) // rows_per_page # Ceiling division
|
|
|
1106 |
with download_port:
|
1107 |
st.download_button(label="Download Portfolio", data=st.session_state['export_file'].to_csv(index=False), file_name="portfolio.csv", mime="text/csv")
|
1108 |
with merge_port:
|
1109 |
+
st.info("Working on this, ignore for now")
|
1110 |
if st.button("Add to export"):
|
1111 |
st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge']])
|
1112 |
else:
|
1113 |
st.error("No portfolio to download")
|
1114 |
|
1115 |
+
# display_frame_source = st.selectbox("Display:", options=['Portfolio', 'Export Base'], key='display_frame_source')
|
1116 |
+
# if display_frame_source == 'Portfolio':
|
1117 |
+
# display_frame = st.session_state['portfolio']
|
1118 |
+
# elif display_frame_source == 'Export Base':
|
1119 |
+
# display_frame = st.session_state['export_base']
|
1120 |
+
display_frame = st.session_state['portfolio']
|
1121 |
total_rows = len(display_frame)
|
1122 |
rows_per_page = 500
|
1123 |
total_pages = (total_rows + rows_per_page - 1) // rows_per_page # Ceiling division
|