James McCool commited on
Commit
70d6b20
·
1 Parent(s): fc2be61

Refine custom export row addition in app.py: update logic to use head for selecting rows, ensuring accurate concatenation of selected rows from the merge DataFrame and improving data integrity in the export process.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -1213,7 +1213,7 @@ with tab2:
1213
  if 'export_merge' in st.session_state:
1214
  select_custom_index = st.number_input("Select rows to add (from top)", min_value=0, max_value=len(st.session_state['export_merge']), value=0)
1215
  if st.button("Add selected to Custom Export"):
1216
- st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge'].iloc[select_custom_index]])
1217
  st.session_state['export_base'] = st.session_state['export_base'].drop_duplicates()
1218
  st.session_state['export_base'] = st.session_state['export_base'].reset_index(drop=True)
1219
  with clear_export:
 
1213
  if 'export_merge' in st.session_state:
1214
  select_custom_index = st.number_input("Select rows to add (from top)", min_value=0, max_value=len(st.session_state['export_merge']), value=0)
1215
  if st.button("Add selected to Custom Export"):
1216
+ st.session_state['export_base'] = pd.concat([st.session_state['export_base'], st.session_state['export_merge'].head(select_custom_index)])
1217
  st.session_state['export_base'] = st.session_state['export_base'].drop_duplicates()
1218
  st.session_state['export_base'] = st.session_state['export_base'].reset_index(drop=True)
1219
  with clear_export: