James McCool commited on
Commit
1d2b4b5
·
1 Parent(s): 5f2bcd1

fixed min/max/std stuff for summary frame

Browse files
Files changed (1) hide show
  1. app.py +44 -21
app.py CHANGED
@@ -297,27 +297,50 @@ with tab2:
297
  with st.container():
298
  if 'working_seed' in st.session_state:
299
  # Create a new dataframe with summary statistics
300
- summary_df = pd.DataFrame({
301
- 'Metric': ['Min', 'Average', 'Max', 'STDdev'],
302
- 'Salary': [
303
- st.session_state.working_seed['salary'].min(),
304
- st.session_state.working_seed['salary'].mean(),
305
- st.session_state.working_seed['salary'].max(),
306
- st.session_state.working_seed['salary'].std()
307
- ],
308
- 'Proj': [
309
- st.session_state.working_seed['proj'].min(),
310
- st.session_state.working_seed['proj'].mean(),
311
- st.session_state.working_seed['proj'].max(),
312
- st.session_state.working_seed['proj'].std()
313
- ],
314
- 'Own': [
315
- st.session_state.working_seed['Own'].min(),
316
- st.session_state.working_seed['Own'].mean(),
317
- st.session_state.working_seed['Own'].max(),
318
- st.session_state.working_seed['Own'].std()
319
- ]
320
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
 
322
  # Set the index of the summary dataframe as the "Metric" column
323
  summary_df = summary_df.set_index('Metric')
 
297
  with st.container():
298
  if 'working_seed' in st.session_state:
299
  # Create a new dataframe with summary statistics
300
+ if site_var1 == 'Draftkings':
301
+ summary_df = pd.DataFrame({
302
+ 'Metric': ['Min', 'Average', 'Max', 'STDdev'],
303
+ 'Salary': [
304
+ np.min(st.session_state.working_seed[:,8]),
305
+ np.mean(st.session_state.working_seed[:,8]),
306
+ np.max(st.session_state.working_seed[:,8]),
307
+ np.std(st.session_state.working_seed[:,8])
308
+ ],
309
+ 'Proj': [
310
+ np.min(st.session_state.working_seed[:,9]),
311
+ np.mean(st.session_state.working_seed[:,9]),
312
+ np.max(st.session_state.working_seed[:,9]),
313
+ np.std(st.session_state.working_seed[:,9])
314
+ ],
315
+ 'Own': [
316
+ np.min(st.session_state.working_seed[:,14]),
317
+ np.mean(st.session_state.working_seed[:,14]),
318
+ np.max(st.session_state.working_seed[:,14]),
319
+ np.std(st.session_state.working_seed[:,14])
320
+ ]
321
+ })
322
+ elif site_var1 == 'Fanduel':
323
+ summary_df = pd.DataFrame({
324
+ 'Metric': ['Min', 'Average', 'Max', 'STDdev'],
325
+ 'Salary': [
326
+ np.min(st.session_state.working_seed[:,9]),
327
+ np.mean(st.session_state.working_seed[:,9]),
328
+ np.max(st.session_state.working_seed[:,9]),
329
+ np.std(st.session_state.working_seed[:,9])
330
+ ],
331
+ 'Proj': [
332
+ np.min(st.session_state.working_seed[:,10]),
333
+ np.mean(st.session_state.working_seed[:,10]),
334
+ np.max(st.session_state.working_seed[:,10]),
335
+ np.std(st.session_state.working_seed[:,10])
336
+ ],
337
+ 'Own': [
338
+ np.min(st.session_state.working_seed[:,15]),
339
+ np.mean(st.session_state.working_seed[:,15]),
340
+ np.max(st.session_state.working_seed[:,15]),
341
+ np.std(st.session_state.working_seed[:,15])
342
+ ]
343
+ })
344
 
345
  # Set the index of the summary dataframe as the "Metric" column
346
  summary_df = summary_df.set_index('Metric')