Spaces:
Running
Running
James McCool
commited on
Commit
·
1d2b4b5
1
Parent(s):
5f2bcd1
fixed min/max/std stuff for summary frame
Browse files
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 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
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')
|