James McCool
commited on
Commit
·
21f63dc
1
Parent(s):
1666aa7
Add informational message for manual loading in app.py
Browse files- Introduced a user-friendly info message to guide users on accessing contest results when manually loading data.
- Updated the contest file helper logic to use the correct contest name variable, ensuring accurate data retrieval.
- Removed debug output for the salary dictionary and contest file helper to streamline the user interface while maintaining functionality.
app.py
CHANGED
@@ -82,6 +82,7 @@ with tab1:
|
|
82 |
else:
|
83 |
pass
|
84 |
with col2:
|
|
|
85 |
if parse_type == 'Manual':
|
86 |
if 'Contest_file_helper' in st.session_state:
|
87 |
del st.session_state['Contest_file_helper']
|
@@ -90,7 +91,7 @@ with tab1:
|
|
90 |
if 'Contest_file' not in st.session_state:
|
91 |
st.session_state['Contest_upload'] = st.file_uploader("Upload Contest File (CSV or Excel)", type=['csv', 'xlsx', 'xls'])
|
92 |
st.session_state['Contest_file'] = pd.read_csv(st.session_state['Contest_upload'])
|
93 |
-
st.session_state['Contest_file_helper'] = grab_contest_data(sport_select,
|
94 |
else:
|
95 |
pass
|
96 |
|
@@ -113,8 +114,6 @@ with tab1:
|
|
113 |
st.session_state['salary_dict'] = dict(zip(st.session_state['salary_df']['Player'], st.session_state['salary_df']['Salary']))
|
114 |
st.session_state['team_dict'] = dict(zip(st.session_state['team_df']['Player'], st.session_state['team_df']['Team']))
|
115 |
st.session_state['pos_dict'] = dict(zip(st.session_state['pos_df']['Player'], st.session_state['pos_df']['Pos']))
|
116 |
-
st.write(st.session_state['salary_dict'])
|
117 |
-
st.table(st.session_state['Contest_file_helper'])
|
118 |
|
119 |
with tab2:
|
120 |
excluded_cols = ['BaseName', 'EntryCount']
|
|
|
82 |
else:
|
83 |
pass
|
84 |
with col2:
|
85 |
+
st.info(f"If you are manually loading and do not have the results CSV for the contest you selected, you can find it here: https://www.draftkings.com/contest/gamecenter/{contest_id_map[contest_name_var]}#/")
|
86 |
if parse_type == 'Manual':
|
87 |
if 'Contest_file_helper' in st.session_state:
|
88 |
del st.session_state['Contest_file_helper']
|
|
|
91 |
if 'Contest_file' not in st.session_state:
|
92 |
st.session_state['Contest_upload'] = st.file_uploader("Upload Contest File (CSV or Excel)", type=['csv', 'xlsx', 'xls'])
|
93 |
st.session_state['Contest_file'] = pd.read_csv(st.session_state['Contest_upload'])
|
94 |
+
st.session_state['Contest_file_helper'] = grab_contest_data(sport_select, contest_name_var, contest_id_map, date_select)
|
95 |
else:
|
96 |
pass
|
97 |
|
|
|
114 |
st.session_state['salary_dict'] = dict(zip(st.session_state['salary_df']['Player'], st.session_state['salary_df']['Salary']))
|
115 |
st.session_state['team_dict'] = dict(zip(st.session_state['team_df']['Player'], st.session_state['team_df']['Team']))
|
116 |
st.session_state['pos_dict'] = dict(zip(st.session_state['pos_df']['Player'], st.session_state['pos_df']['Pos']))
|
|
|
|
|
117 |
|
118 |
with tab2:
|
119 |
excluded_cols = ['BaseName', 'EntryCount']
|