Spaces:
Running
Running
James McCool
commited on
Commit
·
f7c0bfd
1
Parent(s):
1fa49a9
Enhance scoring percentages display in app.py by adding a second background gradient for 'Avg_Salary' and 'Own%' columns, improving visual differentiation and data clarity in both Simple and Advanced views.
Browse files
app.py
CHANGED
@@ -358,10 +358,10 @@ with tab1:
|
|
358 |
if view_var == "Simple":
|
359 |
scoring_percentages = scoring_percentages[['Names', 'Runs', '8+ Runs', 'Win%', 'LevX', 'Own%']]
|
360 |
scoring_percentages = scoring_percentages.set_index('Names', drop=True)
|
361 |
-
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), height=750, use_container_width = True)
|
362 |
elif view_var == "Advanced":
|
363 |
scoring_percentages = scoring_percentages.set_index('Names', drop=True)
|
364 |
-
st.dataframe(scoring_percentages.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(game_format, precision=2), height=750, use_container_width = True)
|
365 |
|
366 |
with tab2:
|
367 |
st.header("Player ROO")
|
|
|
358 |
if view_var == "Simple":
|
359 |
scoring_percentages = scoring_percentages[['Names', 'Runs', '8+ Runs', 'Win%', 'LevX', 'Own%']]
|
360 |
scoring_percentages = scoring_percentages.set_index('Names', drop=True)
|
361 |
+
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)
|
362 |
elif view_var == "Advanced":
|
363 |
scoring_percentages = scoring_percentages.set_index('Names', drop=True)
|
364 |
+
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)
|
365 |
|
366 |
with tab2:
|
367 |
st.header("Player ROO")
|