James McCool
commited on
Commit
·
6230949
1
Parent(s):
bc11c86
Refactor player counts display logic in app.py to improve clarity
Browse files- Introduced a counter variable to manage player counts dynamically, enhancing the clarity of data representation.
- Updated the logic for displaying player counts and exposure percentages, ensuring accurate and consistent naming conventions across the application.
app.py
CHANGED
@@ -198,8 +198,8 @@ with tab2:
|
|
198 |
with st.container():
|
199 |
tab1, tab2 = st.tabs(['Player Used Info', 'Stack Used Info'])
|
200 |
with tab1:
|
|
|
201 |
for each_set in [player_counts, player_1per_counts, player_5per_counts, player_10per_counts, player20_per_counts]:
|
202 |
-
count_var = 0
|
203 |
set_frame = each_set.to_frame().reset_index().rename(columns={'index': 'Player', 'count': 'Count'})
|
204 |
set_frame['Percent'] = set_frame['Count'] / len(working_df)
|
205 |
set_frame = set_frame[['Player', 'Percent']]
|
|
|
198 |
with st.container():
|
199 |
tab1, tab2 = st.tabs(['Player Used Info', 'Stack Used Info'])
|
200 |
with tab1:
|
201 |
+
count_var = 0
|
202 |
for each_set in [player_counts, player_1per_counts, player_5per_counts, player_10per_counts, player20_per_counts]:
|
|
|
203 |
set_frame = each_set.to_frame().reset_index().rename(columns={'index': 'Player', 'count': 'Count'})
|
204 |
set_frame['Percent'] = set_frame['Count'] / len(working_df)
|
205 |
set_frame = set_frame[['Player', 'Percent']]
|