James McCool
commited on
Commit
·
1333fe8
1
Parent(s):
a20af0f
Update app.py to store and display contest information in session state
Browse files- Added storage of the processed working dataframe in session state for better data management.
- Reintroduced the display of contest information in a table format, enhancing user visibility and accessibility to essential data.
app.py
CHANGED
@@ -389,9 +389,9 @@ with tab2:
|
|
389 |
working_df['percentile_finish'] = working_df['index'].rank(pct=True)
|
390 |
working_df['finish'] = working_df['index']
|
391 |
working_df = working_df.drop(['sorted', 'index'], axis=1)
|
|
|
392 |
|
393 |
# Store results
|
394 |
-
st.table(working_df)
|
395 |
st.session_state['field_player_frame'] = create_player_exposures(working_df, st.session_state['player_columns'])
|
396 |
st.session_state['field_stack_frame'] = create_stack_exposures(working_df)
|
397 |
st.session_state['display_contest_info'] = working_df.copy()
|
@@ -465,7 +465,7 @@ with tab2:
|
|
465 |
st.session_state['display_contest_info'] = st.session_state['display_contest_info'][~mask]
|
466 |
if st.session_state['low_entries_var'] and st.session_state['high_entries_var']:
|
467 |
st.session_state['display_contest_info'] = st.session_state['display_contest_info'][st.session_state['display_contest_info']['EntryCount'].between(st.session_state['low_entries_var'], st.session_state['high_entries_var'])]
|
468 |
-
|
469 |
if 'display_contest_info' in st.session_state:
|
470 |
# Initialize pagination in session state if not exists
|
471 |
if 'current_page' not in st.session_state:
|
|
|
389 |
working_df['percentile_finish'] = working_df['index'].rank(pct=True)
|
390 |
working_df['finish'] = working_df['index']
|
391 |
working_df = working_df.drop(['sorted', 'index'], axis=1)
|
392 |
+
st.session_state['check_working_df'] = working_df
|
393 |
|
394 |
# Store results
|
|
|
395 |
st.session_state['field_player_frame'] = create_player_exposures(working_df, st.session_state['player_columns'])
|
396 |
st.session_state['field_stack_frame'] = create_stack_exposures(working_df)
|
397 |
st.session_state['display_contest_info'] = working_df.copy()
|
|
|
465 |
st.session_state['display_contest_info'] = st.session_state['display_contest_info'][~mask]
|
466 |
if st.session_state['low_entries_var'] and st.session_state['high_entries_var']:
|
467 |
st.session_state['display_contest_info'] = st.session_state['display_contest_info'][st.session_state['display_contest_info']['EntryCount'].between(st.session_state['low_entries_var'], st.session_state['high_entries_var'])]
|
468 |
+
st.table(st.session_state['display_contest_info'])
|
469 |
if 'display_contest_info' in st.session_state:
|
470 |
# Initialize pagination in session state if not exists
|
471 |
if 'current_page' not in st.session_state:
|