Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,8 @@ def init_conn():
|
|
35 |
|
36 |
gspreadcon = init_conn()
|
37 |
|
38 |
-
game_format = {'Win Percentage': '{:.2%}','First Inning Lead Percentage': '{:.2%}',
|
39 |
-
'Fifth Inning Lead Percentage': '{:.2%}', '8+ runs': '{:.2%}', 'DK LevX': '{:.2%}', 'FD LevX': '{:.2%}'}
|
40 |
-
|
41 |
player_roo_format = {'Top_finish': '{:.2%}','Top_5_finish': '{:.2%}', 'Top_10_finish': '{:.2%}', '20+%': '{:.2%}', '2x%': '{:.2%}', '3x%': '{:.2%}',
|
42 |
-
'4x%': '{:.2%}'
|
43 |
|
44 |
all_dk_player_projections = 'https://docs.google.com/spreadsheets/d/1NmKa-b-2D3w7rRxwMPSchh31GKfJ1XcDI2GU8rXWnHI/edit#gid=1401252991'
|
45 |
|
@@ -106,7 +103,7 @@ with tab1:
|
|
106 |
if pos_var1 == 'All':
|
107 |
final_Proj = final_Proj.set_index('Player')
|
108 |
final_Proj = final_Proj.sort_values(by='Median', ascending=False)
|
109 |
-
st.dataframe(final_Proj.iloc[:, :-3].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
110 |
st.download_button(
|
111 |
label="Export Tables",
|
112 |
data=convert_df_to_csv(final_Proj),
|
|
|
35 |
|
36 |
gspreadcon = init_conn()
|
37 |
|
|
|
|
|
|
|
38 |
player_roo_format = {'Top_finish': '{:.2%}','Top_5_finish': '{:.2%}', 'Top_10_finish': '{:.2%}', '20+%': '{:.2%}', '2x%': '{:.2%}', '3x%': '{:.2%}',
|
39 |
+
'4x%': '{:.2%}'}
|
40 |
|
41 |
all_dk_player_projections = 'https://docs.google.com/spreadsheets/d/1NmKa-b-2D3w7rRxwMPSchh31GKfJ1XcDI2GU8rXWnHI/edit#gid=1401252991'
|
42 |
|
|
|
103 |
if pos_var1 == 'All':
|
104 |
final_Proj = final_Proj.set_index('Player')
|
105 |
final_Proj = final_Proj.sort_values(by='Median', ascending=False)
|
106 |
+
st.dataframe(final_Proj.iloc[:, :-3].style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), use_container_width = True)
|
107 |
st.download_button(
|
108 |
label="Export Tables",
|
109 |
data=convert_df_to_csv(final_Proj),
|