Spaces:
Running
Running
James McCool
commited on
Commit
·
f307310
1
Parent(s):
86aaff4
Refine gradient coloring for pitcher and hitter dataframes
Browse files
app.py
CHANGED
@@ -110,8 +110,7 @@ with tab2:
|
|
110 |
disp_frame_sp = working_data[['Name', 'Team', 'TBF', 'True_AVG', 'Hits', 'Singles', 'Doubles', 'Homeruns', 'Strikeouts',
|
111 |
'Walks', 'Runs', 'ERA', 'Wins', 'Quality_starts', 'ADP', 'UD_fpts', 'DK_fpts']]
|
112 |
disp_frame_sp = disp_frame_sp.sort_values(by='UD_fpts', ascending=False)
|
113 |
-
st.dataframe(disp_frame_sp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height = 1000, use_container_width = True)
|
114 |
-
|
115 |
|
116 |
st.download_button(
|
117 |
label="Export Pitcher Projections",
|
@@ -139,7 +138,7 @@ with tab3:
|
|
139 |
disp_frame_h = working_data[['Name', 'Team', 'PA', 'Walks', 'xHits', 'Singles', 'Doubles',
|
140 |
'Homeruns', 'Runs', 'RBI', 'Stolen_bases', 'ADP', 'UD_fpts', 'DK_fpts']]
|
141 |
disp_frame_h = disp_frame_h.sort_values(by='UD_fpts', ascending=False)
|
142 |
-
st.dataframe(disp_frame_h.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='
|
143 |
|
144 |
st.download_button(
|
145 |
label="Export Hitter Projections",
|
|
|
110 |
disp_frame_sp = working_data[['Name', 'Team', 'TBF', 'True_AVG', 'Hits', 'Singles', 'Doubles', 'Homeruns', 'Strikeouts',
|
111 |
'Walks', 'Runs', 'ERA', 'Wins', 'Quality_starts', 'ADP', 'UD_fpts', 'DK_fpts']]
|
112 |
disp_frame_sp = disp_frame_sp.sort_values(by='UD_fpts', ascending=False)
|
113 |
+
st.dataframe(disp_frame_sp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn_r').background_gradient(cmap='RdYlGn', subset=['TBF', 'Strikeouts', 'Wins', 'Quality_starts', 'UD_fpts', 'DK_fpts']).format(precision=2), height = 1000, use_container_width = True)
|
|
|
114 |
|
115 |
st.download_button(
|
116 |
label="Export Pitcher Projections",
|
|
|
138 |
disp_frame_h = working_data[['Name', 'Team', 'PA', 'Walks', 'xHits', 'Singles', 'Doubles',
|
139 |
'Homeruns', 'Runs', 'RBI', 'Stolen_bases', 'ADP', 'UD_fpts', 'DK_fpts']]
|
140 |
disp_frame_h = disp_frame_h.sort_values(by='UD_fpts', ascending=False)
|
141 |
+
st.dataframe(disp_frame_h.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['ADP']).format(precision=2), height = 1000, use_container_width = True)
|
142 |
|
143 |
st.download_button(
|
144 |
label="Export Hitter Projections",
|