Spaces:
Running
Running
James McCool
commited on
Commit
·
40ab0f4
1
Parent(s):
2392e35
Refactor background gradient styling in app.py for scoring percentages and player ROO DataFrames to enhance visual clarity by including 'Salary' and 'Own%' in the gradient subset.
Browse files
app.py
CHANGED
@@ -383,7 +383,7 @@ with tab1:
|
|
383 |
if prio_var is not None:
|
384 |
scoring_percentages = scoring_percentages[scoring_percentages['Stack_Prio'] == prio_var]
|
385 |
scoring_percentages = scoring_percentages.set_index('Names', drop=True)
|
386 |
-
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['
|
387 |
|
388 |
with tab2:
|
389 |
st.header("Player ROO")
|
@@ -465,18 +465,18 @@ with tab2:
|
|
465 |
try:
|
466 |
player_roo_disp = player_roo_disp[['Player', 'Salary', 'Median', 'Ceiling', 'Own%', 'Position', 'Team']]
|
467 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
468 |
-
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
|
469 |
except:
|
470 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
471 |
-
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
|
472 |
|
473 |
elif view_var == "Advanced":
|
474 |
try:
|
475 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
476 |
-
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
|
477 |
except:
|
478 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
479 |
-
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(player_roo_format, precision=2), height=750, use_container_width = True)
|
480 |
|
481 |
with tab3:
|
482 |
st.header("Optimals")
|
|
|
383 |
if prio_var is not None:
|
384 |
scoring_percentages = scoring_percentages[scoring_percentages['Stack_Prio'] == prio_var]
|
385 |
scoring_percentages = scoring_percentages.set_index('Names', drop=True)
|
386 |
+
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['Avg_Salary', 'Own%']).format(game_format, precision=2), height=750, use_container_width = True)
|
387 |
|
388 |
with tab2:
|
389 |
st.header("Player ROO")
|
|
|
465 |
try:
|
466 |
player_roo_disp = player_roo_disp[['Player', 'Salary', 'Median', 'Ceiling', 'Own%', 'Position', 'Team']]
|
467 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
468 |
+
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['Salary', 'Own%']).format(player_roo_format, precision=2), height=750, use_container_width = True)
|
469 |
except:
|
470 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
471 |
+
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['Salary', 'Own%']).format(player_roo_format, precision=2), height=750, use_container_width = True)
|
472 |
|
473 |
elif view_var == "Advanced":
|
474 |
try:
|
475 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
476 |
+
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['Order', 'Salary', 'Own%']).format(player_roo_format, precision=2), height=750, use_container_width = True)
|
477 |
except:
|
478 |
player_roo_disp = player_roo_disp.set_index('Player', drop=True)
|
479 |
+
st.dataframe(player_roo_disp.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['Order', 'Salary', 'Own%']).format(player_roo_format, precision=2), height=750, use_container_width = True)
|
480 |
|
481 |
with tab3:
|
482 |
st.header("Optimals")
|