Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -90,15 +90,23 @@ with tab1:
|
|
| 90 |
raw_baselines = dk_raw
|
| 91 |
elif site_var1 == 'Fanduel':
|
| 92 |
raw_baselines = fd_raw
|
|
|
|
| 93 |
team_var1 = st.radio("Do you want a frame with specific teams?", ('Full Slate', 'Specific Teams'), key='team_var1')
|
| 94 |
if team_var1 == 'Specific Teams':
|
| 95 |
team_var2 = st.multiselect('Which teams do you want?', options = DK_seed['Team'].unique())
|
| 96 |
elif team_var1 == 'Full Slate':
|
| 97 |
team_var2 = DK_seed.Team.values.tolist()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
with col2:
|
| 100 |
if site_var1 == 'Draftkings':
|
| 101 |
DK_seed_parse = DK_seed[DK_seed['Team'].isin(team_var2)]
|
|
|
|
| 102 |
st.session_state.data_export_display = DK_seed_parse.head(1000)
|
| 103 |
st.session_state.data_export = DK_seed_parse
|
| 104 |
st.session_state.data_export_freq = pd.DataFrame(np.column_stack(np.unique(st.session_state.data_export.iloc[:,0:9].values, return_counts=True)),
|
|
@@ -117,6 +125,7 @@ with tab1:
|
|
| 117 |
st.dataframe(st.session_state.data_export_freq.style.format(percentages_format, precision=2), height=500, use_container_width=True)
|
| 118 |
elif site_var1 == 'Fanduel':
|
| 119 |
FD_seed_parse = FD_seed[FD_seed['Team'].isin(team_var2)]
|
|
|
|
| 120 |
st.session_state.data_export_display = FD_seed_parse.head(1000)
|
| 121 |
st.session_state.data_export = FD_seed_parse
|
| 122 |
st.session_state.data_export_freq = pd.DataFrame(np.column_stack(np.unique(st.session_state.data_export.iloc[:,0:8].values, return_counts=True)),
|
|
|
|
| 90 |
raw_baselines = dk_raw
|
| 91 |
elif site_var1 == 'Fanduel':
|
| 92 |
raw_baselines = fd_raw
|
| 93 |
+
|
| 94 |
team_var1 = st.radio("Do you want a frame with specific teams?", ('Full Slate', 'Specific Teams'), key='team_var1')
|
| 95 |
if team_var1 == 'Specific Teams':
|
| 96 |
team_var2 = st.multiselect('Which teams do you want?', options = DK_seed['Team'].unique())
|
| 97 |
elif team_var1 == 'Full Slate':
|
| 98 |
team_var2 = DK_seed.Team.values.tolist()
|
| 99 |
+
|
| 100 |
+
stack_var1 = st.radio("Do you want a frame with specific stack sizes?", ('Full Slate', 'Specific Stack Sizes'), key='stack_var1')
|
| 101 |
+
if stack_var1 == 'Specific Stack Sizes':
|
| 102 |
+
stack_var2 = st.multiselect('Which stack sizes do you want?', options = DK_seed['Team_count'].unique())
|
| 103 |
+
elif stack_var1 == 'Full Slate':
|
| 104 |
+
stack_var2 = DK_seed.Team_count.values.tolist()
|
| 105 |
|
| 106 |
with col2:
|
| 107 |
if site_var1 == 'Draftkings':
|
| 108 |
DK_seed_parse = DK_seed[DK_seed['Team'].isin(team_var2)]
|
| 109 |
+
DK_seed_parse = DK_seed[DK_seed['Team_count'].isin(stack_var2)]
|
| 110 |
st.session_state.data_export_display = DK_seed_parse.head(1000)
|
| 111 |
st.session_state.data_export = DK_seed_parse
|
| 112 |
st.session_state.data_export_freq = pd.DataFrame(np.column_stack(np.unique(st.session_state.data_export.iloc[:,0:9].values, return_counts=True)),
|
|
|
|
| 125 |
st.dataframe(st.session_state.data_export_freq.style.format(percentages_format, precision=2), height=500, use_container_width=True)
|
| 126 |
elif site_var1 == 'Fanduel':
|
| 127 |
FD_seed_parse = FD_seed[FD_seed['Team'].isin(team_var2)]
|
| 128 |
+
FD_seed_parse = FD_seed[FD_seed['Team_count'].isin(stack_var2)]
|
| 129 |
st.session_state.data_export_display = FD_seed_parse.head(1000)
|
| 130 |
st.session_state.data_export = FD_seed_parse
|
| 131 |
st.session_state.data_export_freq = pd.DataFrame(np.column_stack(np.unique(st.session_state.data_export.iloc[:,0:8].values, return_counts=True)),
|