Spaces:
Running
Running
James McCool
commited on
Commit
·
a70f4bd
1
Parent(s):
f20c215
Improve dataframe percentage formatting precision for NBA and MMA displays
Browse files
app.py
CHANGED
@@ -126,8 +126,8 @@ with tab2:
|
|
126 |
try:
|
127 |
if 'disp_file' in locals():
|
128 |
if sport_var == "NBA":
|
129 |
-
st.dataframe(disp_file.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(nba_percentages_format), height=1000, use_container_width = True)
|
130 |
elif sport_var == "MMA":
|
131 |
-
st.dataframe(disp_file.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(mma_percentages_format), height=1000, use_container_width = True)
|
132 |
except:
|
133 |
pass
|
|
|
126 |
try:
|
127 |
if 'disp_file' in locals():
|
128 |
if sport_var == "NBA":
|
129 |
+
st.dataframe(disp_file.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(nba_percentages_format, precision=2), height=1000, use_container_width = True)
|
130 |
elif sport_var == "MMA":
|
131 |
+
st.dataframe(disp_file.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(mma_percentages_format, precision=2), height=1000, use_container_width = True)
|
132 |
except:
|
133 |
pass
|