Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,7 +102,7 @@ with tab1:
|
|
| 102 |
if line_var1 == 'American':
|
| 103 |
team_frame = team_frame[['Team', 'Opp', 'Win Line', 'Vegas Line', 'Line Diff', 'PD Spread', 'Vegas Spread', 'Spread Diff']]
|
| 104 |
team_frame = team_frame.set_index('Team')
|
| 105 |
-
st.dataframe(team_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 106 |
|
| 107 |
st.download_button(
|
| 108 |
label="Export Team Model",
|
|
@@ -129,7 +129,7 @@ with tab2:
|
|
| 129 |
qb_stats = qb_stats[qb_stats['Team'].isin(team_var1)]
|
| 130 |
qb_stats_disp = qb_stats.set_index('Player')
|
| 131 |
qb_stats_disp = qb_stats_disp.sort_values(by='PPR', ascending=False)
|
| 132 |
-
st.dataframe(qb_stats_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 133 |
st.download_button(
|
| 134 |
label="Export Prop Model",
|
| 135 |
data=convert_df_to_csv(qb_stats_disp),
|
|
@@ -155,7 +155,7 @@ with tab3:
|
|
| 155 |
non_qb_stats = non_qb_stats[non_qb_stats['Team'].isin(team_var2)]
|
| 156 |
non_qb_stats_disp = non_qb_stats.set_index('Player')
|
| 157 |
non_qb_stats_disp = non_qb_stats_disp.sort_values(by='PPR', ascending=False)
|
| 158 |
-
st.dataframe(non_qb_stats_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 159 |
st.download_button(
|
| 160 |
label="Export Prop Model",
|
| 161 |
data=convert_df_to_csv(non_qb_stats_disp),
|
|
@@ -183,7 +183,7 @@ with tab4:
|
|
| 183 |
prop_frame_disp = prop_frame_disp[prop_frame_disp['prop_type'] == prop_type_var2]
|
| 184 |
prop_frame_disp = prop_frame_disp.set_index('Player')
|
| 185 |
prop_frame_disp = prop_frame_disp.sort_values(by='Trending Over', ascending=False)
|
| 186 |
-
st.dataframe(prop_frame_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(prop_format, precision=2), use_container_width = True)
|
| 187 |
st.download_button(
|
| 188 |
label="Export Prop Trends Model",
|
| 189 |
data=convert_df_to_csv(prop_frame_disp),
|
|
|
|
| 102 |
if line_var1 == 'American':
|
| 103 |
team_frame = team_frame[['Team', 'Opp', 'Win Line', 'Vegas Line', 'Line Diff', 'PD Spread', 'Vegas Spread', 'Spread Diff']]
|
| 104 |
team_frame = team_frame.set_index('Team')
|
| 105 |
+
st.dataframe(team_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height = 1000, use_container_width = True)
|
| 106 |
|
| 107 |
st.download_button(
|
| 108 |
label="Export Team Model",
|
|
|
|
| 129 |
qb_stats = qb_stats[qb_stats['Team'].isin(team_var1)]
|
| 130 |
qb_stats_disp = qb_stats.set_index('Player')
|
| 131 |
qb_stats_disp = qb_stats_disp.sort_values(by='PPR', ascending=False)
|
| 132 |
+
st.dataframe(qb_stats_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height = 1000, use_container_width = True)
|
| 133 |
st.download_button(
|
| 134 |
label="Export Prop Model",
|
| 135 |
data=convert_df_to_csv(qb_stats_disp),
|
|
|
|
| 155 |
non_qb_stats = non_qb_stats[non_qb_stats['Team'].isin(team_var2)]
|
| 156 |
non_qb_stats_disp = non_qb_stats.set_index('Player')
|
| 157 |
non_qb_stats_disp = non_qb_stats_disp.sort_values(by='PPR', ascending=False)
|
| 158 |
+
st.dataframe(non_qb_stats_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height = 1000, use_container_width = True)
|
| 159 |
st.download_button(
|
| 160 |
label="Export Prop Model",
|
| 161 |
data=convert_df_to_csv(non_qb_stats_disp),
|
|
|
|
| 183 |
prop_frame_disp = prop_frame_disp[prop_frame_disp['prop_type'] == prop_type_var2]
|
| 184 |
prop_frame_disp = prop_frame_disp.set_index('Player')
|
| 185 |
prop_frame_disp = prop_frame_disp.sort_values(by='Trending Over', ascending=False)
|
| 186 |
+
st.dataframe(prop_frame_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(prop_format, height = 1000, precision=2), use_container_width = True)
|
| 187 |
st.download_button(
|
| 188 |
label="Export Prop Trends Model",
|
| 189 |
data=convert_df_to_csv(prop_frame_disp),
|