Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -75,6 +75,7 @@ with tab1:
|
|
75 |
player_frame, line_frame, pp_frame, timestamp = player_stat_table()
|
76 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
77 |
site_var1 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var1')
|
|
|
78 |
split_var1 = st.radio("Would you like to view the whole slate or just specific games?", ('Full Slate Run', 'Specific Games'), key='split_var1')
|
79 |
if split_var1 == 'Specific Games':
|
80 |
team_var1 = st.multiselect('Which teams would you like to include in the ROO?', options = player_frame['Team'].unique(), key='team_var1')
|
@@ -90,6 +91,7 @@ with tab1:
|
|
90 |
with col2:
|
91 |
final_Proj = player_frame[player_frame['Site'] == str(site_var1)]
|
92 |
final_Proj = final_Proj[final_Proj['Type'] == 'Basic']
|
|
|
93 |
final_Proj = final_Proj[player_frame['Team'].isin(team_var1)]
|
94 |
final_Proj = final_Proj[final_Proj['Salary'] >= sal_var1[0]]
|
95 |
final_Proj = final_Proj[final_Proj['Salary'] <= sal_var1[1]]
|
@@ -115,10 +117,12 @@ with tab2:
|
|
115 |
player_frame, line_frame, pp_frame, timestamp = player_stat_table()
|
116 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
117 |
site_var2 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var2')
|
|
|
118 |
|
119 |
with col2:
|
120 |
final_line_combos = line_frame[line_frame['Site'] == str(site_var2)]
|
121 |
final_line_combos = final_line_combos[final_line_combos['Type'] == 'Basic']
|
|
|
122 |
final_line_combos = final_line_combos.sort_values(by='Median', ascending=False)
|
123 |
st.dataframe(final_line_combos.iloc[:, :-3].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
124 |
st.download_button(
|
@@ -137,10 +141,12 @@ with tab3:
|
|
137 |
player_frame, line_frame, pp_frame, timestamp = player_stat_table()
|
138 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
139 |
site_var3 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var3')
|
|
|
140 |
|
141 |
with col2:
|
142 |
final_pp_combos = pp_frame[pp_frame['Site'] == str(site_var3)]
|
143 |
final_pp_combos = final_pp_combos[final_pp_combos['Type'] == 'Basic']
|
|
|
144 |
final_pp_combos = final_pp_combos.sort_values(by='Median', ascending=False)
|
145 |
st.dataframe(final_pp_combos.iloc[:, :-3].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
146 |
st.download_button(
|
|
|
75 |
player_frame, line_frame, pp_frame, timestamp = player_stat_table()
|
76 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
77 |
site_var1 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var1')
|
78 |
+
main_var1 = st.radio("Main slate or secondary slate?", ('Main Slate', 'Secondary'), key='main_var1')
|
79 |
split_var1 = st.radio("Would you like to view the whole slate or just specific games?", ('Full Slate Run', 'Specific Games'), key='split_var1')
|
80 |
if split_var1 == 'Specific Games':
|
81 |
team_var1 = st.multiselect('Which teams would you like to include in the ROO?', options = player_frame['Team'].unique(), key='team_var1')
|
|
|
91 |
with col2:
|
92 |
final_Proj = player_frame[player_frame['Site'] == str(site_var1)]
|
93 |
final_Proj = final_Proj[final_Proj['Type'] == 'Basic']
|
94 |
+
final_Proj = final_Proj[final_Proj['Slate'] == main_var1]
|
95 |
final_Proj = final_Proj[player_frame['Team'].isin(team_var1)]
|
96 |
final_Proj = final_Proj[final_Proj['Salary'] >= sal_var1[0]]
|
97 |
final_Proj = final_Proj[final_Proj['Salary'] <= sal_var1[1]]
|
|
|
117 |
player_frame, line_frame, pp_frame, timestamp = player_stat_table()
|
118 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
119 |
site_var2 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var2')
|
120 |
+
main_var2 = st.radio("Main slate or secondary slate?", ('Main Slate', 'Secondary'), key='main_var2')
|
121 |
|
122 |
with col2:
|
123 |
final_line_combos = line_frame[line_frame['Site'] == str(site_var2)]
|
124 |
final_line_combos = final_line_combos[final_line_combos['Type'] == 'Basic']
|
125 |
+
final_line_combos = final_line_combos[final_line_combos['Slate'] == main_var2]
|
126 |
final_line_combos = final_line_combos.sort_values(by='Median', ascending=False)
|
127 |
st.dataframe(final_line_combos.iloc[:, :-3].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
128 |
st.download_button(
|
|
|
141 |
player_frame, line_frame, pp_frame, timestamp = player_stat_table()
|
142 |
t_stamp = f"Last Update: " + str(timestamp) + f" CST"
|
143 |
site_var3 = st.radio("What table would you like to display?", ('Draftkings', 'Fanduel'), key='site_var3')
|
144 |
+
main_var3 = st.radio("Main slate or secondary slate?", ('Main Slate', 'Secondary'), key='main_var3')
|
145 |
|
146 |
with col2:
|
147 |
final_pp_combos = pp_frame[pp_frame['Site'] == str(site_var3)]
|
148 |
final_pp_combos = final_pp_combos[final_pp_combos['Type'] == 'Basic']
|
149 |
+
final_pp_combos = final_pp_combos[final_pp_combos['Slate'] == main_var3]
|
150 |
final_pp_combos = final_pp_combos.sort_values(by='Median', ascending=False)
|
151 |
st.dataframe(final_pp_combos.iloc[:, :-3].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
152 |
st.download_button(
|