James McCool
commited on
Commit
·
908f7d9
1
Parent(s):
ee49c6f
Update data handling in app.py for contest file processing
Browse files- Modified the assignment of variables when loading contest files to use ownership_df and fpts_df, enhancing clarity and consistency.
- Updated the find_name_mismatches function call to utilize the new variable names, ensuring accurate data handling and maintaining session state integrity.
app.py
CHANGED
@@ -35,7 +35,7 @@ with tab1:
|
|
35 |
del st.session_state['Contest']
|
36 |
|
37 |
if Contest_file:
|
38 |
-
st.session_state['Contest'],
|
39 |
st.session_state['Contest'] = st.session_state['Contest'].dropna(how='all')
|
40 |
st.session_state['Contest'] = st.session_state['Contest'].reset_index(drop=True)
|
41 |
if st.session_state['Contest'] is not None:
|
@@ -79,7 +79,7 @@ with tab1:
|
|
79 |
st.session_state['projections_df'] = projections.copy()
|
80 |
st.session_state['projections_df']['salary'] = (st.session_state['projections_df']['salary'].astype(str).str.replace(',', '').astype(float).astype(int))
|
81 |
# Run name matching only once when first loading the files
|
82 |
-
st.session_state['Contest'], st.session_state['projections_df'], st.session_state['ownership_dict'], st.session_state['actual_dict'] = find_name_mismatches(st.session_state['Contest'], st.session_state['projections_df'],
|
83 |
|
84 |
with tab2:
|
85 |
if 'Contest' in st.session_state and 'projections_df' in st.session_state:
|
|
|
35 |
del st.session_state['Contest']
|
36 |
|
37 |
if Contest_file:
|
38 |
+
st.session_state['Contest'], ownership_df, fpts_df, st.session_state['entry_list'] = load_contest_file(Contest_file, sport_select)
|
39 |
st.session_state['Contest'] = st.session_state['Contest'].dropna(how='all')
|
40 |
st.session_state['Contest'] = st.session_state['Contest'].reset_index(drop=True)
|
41 |
if st.session_state['Contest'] is not None:
|
|
|
79 |
st.session_state['projections_df'] = projections.copy()
|
80 |
st.session_state['projections_df']['salary'] = (st.session_state['projections_df']['salary'].astype(str).str.replace(',', '').astype(float).astype(int))
|
81 |
# Run name matching only once when first loading the files
|
82 |
+
st.session_state['Contest'], st.session_state['projections_df'], st.session_state['ownership_dict'], st.session_state['actual_dict'] = find_name_mismatches(st.session_state['Contest'], st.session_state['projections_df'], ownership_df, fpts_df)
|
83 |
|
84 |
with tab2:
|
85 |
if 'Contest' in st.session_state and 'projections_df' in st.session_state:
|