Spaces:
Running
Running
James McCool
commited on
Commit
·
ced1179
1
Parent(s):
81c5c0f
Refactor player position count calculations in Streamlit app for improved clarity and accuracy in displayed statistics.
Browse files- src/streamlit_app.py +4 -4
src/streamlit_app.py
CHANGED
@@ -466,16 +466,16 @@ def main():
|
|
466 |
qb_count_col, rb_count_col, wr_count_col, te_count_col = st.columns(4)
|
467 |
with qb_count_col:
|
468 |
st.subheader("QB Counts")
|
469 |
-
st.write(f"Total QB top 12: {final_df.loc[0:11, 'Pos'] == 'QB'.sum()}")
|
470 |
with rb_count_col:
|
471 |
st.subheader("RB Counts")
|
472 |
-
st.write(f"Total RB top 12: {final_df.loc[0:11, 'Pos'] == 'RB'.sum()}")
|
473 |
with wr_count_col:
|
474 |
st.subheader("WR Counts")
|
475 |
-
st.write(f"Total WR top 12: {final_df.loc[0:11, 'Pos'] == 'WR'.sum()}")
|
476 |
with te_count_col:
|
477 |
st.subheader("TE Counts")
|
478 |
-
st.write(f"Total TE top 12: {final_df.loc[0:11, 'Pos'] == 'TE'.sum()}")
|
479 |
|
480 |
|
481 |
# Position breakdown
|
|
|
466 |
qb_count_col, rb_count_col, wr_count_col, te_count_col = st.columns(4)
|
467 |
with qb_count_col:
|
468 |
st.subheader("QB Counts")
|
469 |
+
st.write(f"Total QB top 12: {(final_df.loc[0:11, 'Pos'] == 'QB').sum()}")
|
470 |
with rb_count_col:
|
471 |
st.subheader("RB Counts")
|
472 |
+
st.write(f"Total RB top 12: {(final_df.loc[0:11, 'Pos'] == 'RB').sum()}")
|
473 |
with wr_count_col:
|
474 |
st.subheader("WR Counts")
|
475 |
+
st.write(f"Total WR top 12: {(final_df.loc[0:11, 'Pos'] == 'WR').sum()}")
|
476 |
with te_count_col:
|
477 |
st.subheader("TE Counts")
|
478 |
+
st.write(f"Total TE top 12: {(final_df.loc[0:11, 'Pos'] == 'TE').sum()}")
|
479 |
|
480 |
|
481 |
# Position breakdown
|