James McCool
commited on
Commit
·
db441e2
1
Parent(s):
5dfac9c
Update date selection logic in app.py to sort dates in descending order
Browse files- Modified the date selection dropdown to display dates in descending order, improving user experience by prioritizing the most recent contests.
- Ensured that the selection logic remains consistent with the updated date format for further processing.
app.py
CHANGED
@@ -60,7 +60,7 @@ with tab1:
|
|
60 |
contest_names, contest_id_map, curr_info = grab_contest_names(db, sport_select)
|
61 |
|
62 |
with col3:
|
63 |
-
date_select = st.selectbox("Select Date", curr_info['Date'].unique(), key='date_select')
|
64 |
|
65 |
name_parse = curr_info[curr_info['Date'] == date_select]['Contest Name'].reset_index(drop=True)
|
66 |
date_select = date_select.replace('-', '')
|
|
|
60 |
contest_names, contest_id_map, curr_info = grab_contest_names(db, sport_select)
|
61 |
|
62 |
with col3:
|
63 |
+
date_select = st.selectbox("Select Date", curr_info['Date'].unique().sort_values(ascending=False), key='date_select')
|
64 |
|
65 |
name_parse = curr_info[curr_info['Date'] == date_select]['Contest Name'].reset_index(drop=True)
|
66 |
date_select = date_select.replace('-', '')
|