Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,8 @@ def init_conn():
|
|
36 |
|
37 |
gcservice_account = init_conn()
|
38 |
|
|
|
|
|
39 |
all_dk_player_projections = 'https://docs.google.com/spreadsheets/d/1NmKa-b-2D3w7rRxwMPSchh31GKfJ1XcDI2GU8rXWnHI/edit#gid=943304327'
|
40 |
|
41 |
@st.cache_resource(ttl = 600)
|
@@ -426,7 +428,7 @@ with tab2:
|
|
426 |
if wvar == 2:
|
427 |
pname = len(line_hold)
|
428 |
elif wvar < 2:
|
429 |
-
if line_hold.iat[pname,1] == '
|
430 |
if line_hold.iat[pname,0] not in p_used:
|
431 |
sorted_lineup.append(line_hold.iat[pname,0])
|
432 |
wvar = wvar + 1
|
@@ -576,4 +578,4 @@ with tab2:
|
|
576 |
)
|
577 |
with freq_container:
|
578 |
freq_container = st.empty()
|
579 |
-
st.dataframe(player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
|
|
36 |
|
37 |
gcservice_account = init_conn()
|
38 |
|
39 |
+
expose_format = {'Proj Own': '{:.2%}','Exposure': '{:.2%}'}
|
40 |
+
|
41 |
all_dk_player_projections = 'https://docs.google.com/spreadsheets/d/1NmKa-b-2D3w7rRxwMPSchh31GKfJ1XcDI2GU8rXWnHI/edit#gid=943304327'
|
42 |
|
43 |
@st.cache_resource(ttl = 600)
|
|
|
428 |
if wvar == 2:
|
429 |
pname = len(line_hold)
|
430 |
elif wvar < 2:
|
431 |
+
if line_hold.iat[pname,1] == 'W':
|
432 |
if line_hold.iat[pname,0] not in p_used:
|
433 |
sorted_lineup.append(line_hold.iat[pname,0])
|
434 |
wvar = wvar + 1
|
|
|
578 |
)
|
579 |
with freq_container:
|
580 |
freq_container = st.empty()
|
581 |
+
st.dataframe(player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(expose_format, precision=2), use_container_width = True)
|