James McCool commited on
Commit
ecf059f
·
1 Parent(s): 83df1df

Enhance export file processing in app.py: implement mapping for non-excluded columns in the export file using the export dictionary, ensuring improved data accuracy during portfolio downloads.

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -904,6 +904,9 @@ with tab2:
904
  download_type = st.selectbox("Simple or Advanced Download?", options=['Simple', 'Advanced'], key='download_choice')
905
  if download_type == 'Simple':
906
  st.session_state['export_file'] = st.session_state['portfolio'].copy()
 
 
 
907
  else:
908
  with st.form(key='stack_form'):
909
  st.subheader("Stack Count Adjustments")
 
904
  download_type = st.selectbox("Simple or Advanced Download?", options=['Simple', 'Advanced'], key='download_choice')
905
  if download_type == 'Simple':
906
  st.session_state['export_file'] = st.session_state['portfolio'].copy()
907
+ for col in st.session_state['export_file'].columns:
908
+ if col not in excluded_cols:
909
+ st.session_state['export_file'][col] = st.session_state['export_file'][col].map(st.session_state['export_dict'])
910
  else:
911
  with st.form(key='stack_form'):
912
  st.subheader("Stack Count Adjustments")