James McCool commited on
Commit
981c8e1
·
1 Parent(s): eb4f26f

adjusted for numpy array

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -389,11 +389,11 @@ with tab2:
389
  if st.button("Prepare data export", key='data_export'):
390
  data_export = st.session_state.working_seed.copy()
391
  if site_var1 == 'Draftkings':
392
- for col in data_export.iloc[:, 0:8].columns:
393
- data_export[col] = data_export[col].map(id_dict)
394
  elif site_var1 == 'Fanduel':
395
- for col in data_export.iloc[:, 0:9].columns:
396
- data_export[col] = data_export[col].map(id_dict)
397
  st.download_button(
398
  label="Export optimals set",
399
  data=convert_df(data_export),
 
389
  if st.button("Prepare data export", key='data_export'):
390
  data_export = st.session_state.working_seed.copy()
391
  if site_var1 == 'Draftkings':
392
+ for col_idx in range(8):
393
+ data_export[:, col_idx] = np.array([id_dict.get(player, player) for player in data_export[:, col_idx]])
394
  elif site_var1 == 'Fanduel':
395
+ for col_idx in range(9):
396
+ data_export[:, col_idx] = np.array([id_dict.get(player, player) for player in data_export[:, col_idx]])
397
  st.download_button(
398
  label="Export optimals set",
399
  data=convert_df(data_export),