Multichem commited on
Commit
4f114ee
·
verified ·
1 Parent(s): 12b0c46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -145,23 +145,25 @@ with tab1:
145
  # working_seed_parse = working_seed[np.isin(working_seed[:, 3], stack_var2)]
146
  data_export_display = pd.DataFrame(working_seed[0:1000], columns=column_names)
147
  st.session_state.data_export_display = data_export_display.copy()
148
- st.session_state.data_export = working_seed.copy()
149
  # st.session_state.data_export_freq = calculate_value_frequencies(st.session_state.data_export)
150
 
151
- if 'data_export' in st.session_state:
152
- st.download_button(
153
- label="Export optimals set",
154
- data=convert_df(st.session_state.data_export),
155
- file_name='MLB_optimals_export.csv',
156
- mime='text/csv',
157
- )
158
  with st.container():
159
  if 'data_export_display' in st.session_state:
160
  st.dataframe(st.session_state.data_export_display.style.format(precision=2), height=500, use_container_width=True)
161
  with st.container():
162
  if 'data_export_freq' in st.session_state:
163
  st.dataframe(st.session_state.data_export_freq.style.format(percentages_format, precision=2), height=500, use_container_width=True)
164
-
 
 
 
 
 
 
 
 
 
165
  elif site_var1 == 'Fanduel':
166
 
167
  working_seed = init_FD_seed_frame()
 
145
  # working_seed_parse = working_seed[np.isin(working_seed[:, 3], stack_var2)]
146
  data_export_display = pd.DataFrame(working_seed[0:1000], columns=column_names)
147
  st.session_state.data_export_display = data_export_display.copy()
148
+
149
  # st.session_state.data_export_freq = calculate_value_frequencies(st.session_state.data_export)
150
 
 
 
 
 
 
 
 
151
  with st.container():
152
  if 'data_export_display' in st.session_state:
153
  st.dataframe(st.session_state.data_export_display.style.format(precision=2), height=500, use_container_width=True)
154
  with st.container():
155
  if 'data_export_freq' in st.session_state:
156
  st.dataframe(st.session_state.data_export_freq.style.format(percentages_format, precision=2), height=500, use_container_width=True)
157
+ if st.button("Prepare data export", key='data_export')
158
+ st.session_state.data_export = working_seed.copy()
159
+ if 'data_export' in st.session_state:
160
+ st.download_button(
161
+ label="Export optimals set",
162
+ data=convert_df(st.session_state.data_export),
163
+ file_name='MLB_optimals_export.csv',
164
+ mime='text/csv',
165
+ )
166
+
167
  elif site_var1 == 'Fanduel':
168
 
169
  working_seed = init_FD_seed_frame()