James McCool commited on
Commit
2606a81
·
1 Parent(s): 0e8dd68

added index back to export file

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -313,6 +313,7 @@ with tab1:
313
  display_proj = display_proj
314
  elif view_var2 == 'Simple':
315
  display_proj = display_proj[['Player', 'Team', 'Position', 'Median', 'GPP%', 'ValX']]
 
316
  display_proj = display_proj.set_index('Player')
317
  st.session_state.display_proj = display_proj
318
 
@@ -330,7 +331,7 @@ with tab1:
330
  if 'display_proj' in st.session_state:
331
  st.download_button(
332
  label="Export Tables",
333
- data=convert_df_to_csv(st.session_state.display_proj),
334
  file_name='NBA_ROO_export.csv',
335
  mime='text/csv',
336
  )
 
313
  display_proj = display_proj
314
  elif view_var2 == 'Simple':
315
  display_proj = display_proj[['Player', 'Team', 'Position', 'Median', 'GPP%', 'ValX']]
316
+ export_data = display_proj.copy()
317
  display_proj = display_proj.set_index('Player')
318
  st.session_state.display_proj = display_proj
319
 
 
331
  if 'display_proj' in st.session_state:
332
  st.download_button(
333
  label="Export Tables",
334
+ data=convert_df_to_csv(export_data),
335
  file_name='NBA_ROO_export.csv',
336
  mime='text/csv',
337
  )