Spaces:
Running
Running
James McCool
commited on
Commit
·
74d3eb1
1
Parent(s):
ea83f72
Limit displayed summary rows to the top 10 in app.py for improved clarity and user experience in the lineup summary. Adjusted labels for better context on salary and leftover amounts.
Browse files
app.py
CHANGED
@@ -1026,21 +1026,21 @@ with tab4:
|
|
1026 |
'2x%': [avg_2x],
|
1027 |
'Own%': [total_own]
|
1028 |
})
|
1029 |
-
summary_row = summary_row[['Salary', 'Median', 'Own%']]
|
1030 |
|
1031 |
col1, col2, col3 = st.columns([2, 1, 3])
|
1032 |
with col1:
|
1033 |
if (10 - len(filled_lineup)) > 0:
|
1034 |
st.markdown(f"""
|
1035 |
<div style='text-align: left'>
|
1036 |
-
<b>💰 Per Player:</b>
|
1037 |
</div>
|
1038 |
""",
|
1039 |
unsafe_allow_html=True)
|
1040 |
else:
|
1041 |
st.markdown(f"""
|
1042 |
<div style='text-align: left'>
|
1043 |
-
<b>💰
|
1044 |
</div>
|
1045 |
""",
|
1046 |
unsafe_allow_html=True)
|
|
|
1026 |
'2x%': [avg_2x],
|
1027 |
'Own%': [total_own]
|
1028 |
})
|
1029 |
+
summary_row = summary_row[['Salary', 'Median', 'Own%']].head(10)
|
1030 |
|
1031 |
col1, col2, col3 = st.columns([2, 1, 3])
|
1032 |
with col1:
|
1033 |
if (10 - len(filled_lineup)) > 0:
|
1034 |
st.markdown(f"""
|
1035 |
<div style='text-align: left'>
|
1036 |
+
<b>💰 Per Player:</b> ${round((50000 - total_salary) / (10 - len(filled_lineup)), 0)}
|
1037 |
</div>
|
1038 |
""",
|
1039 |
unsafe_allow_html=True)
|
1040 |
else:
|
1041 |
st.markdown(f"""
|
1042 |
<div style='text-align: left'>
|
1043 |
+
<b>💰 Leftover:</b> ${round(50000 - total_salary, 0)}
|
1044 |
</div>
|
1045 |
""",
|
1046 |
unsafe_allow_html=True)
|