James McCool
commited on
Commit
·
679a52f
1
Parent(s):
38d3f0b
Update date parsing in grab_contest_names function for consistency
Browse files- Modified the date parsing in the grab_contest_names function to specify the date format as '%Y-%m-%d', ensuring consistent handling of date data.
- This change enhances data integrity and aligns with ongoing efforts to improve data processing within the application.
app.py
CHANGED
@@ -22,7 +22,7 @@ def grab_contest_names(db, sport):
|
|
22 |
cursor = collection.find()
|
23 |
|
24 |
curr_info = pd.DataFrame(list(cursor)).drop('_id', axis=1)
|
25 |
-
curr_info['Date'] = pd.to_datetime(curr_info['Date'])
|
26 |
contest_names = curr_info['Contest Name']
|
27 |
contest_id_map = dict(zip(curr_info['Contest Name'], curr_info['Contest ID']))
|
28 |
contest_date_map = dict(zip(curr_info['Contest Name'], curr_info['Date']))
|
|
|
22 |
cursor = collection.find()
|
23 |
|
24 |
curr_info = pd.DataFrame(list(cursor)).drop('_id', axis=1)
|
25 |
+
curr_info['Date'] = pd.to_datetime(curr_info['Date'], format='%Y-%m-%d')
|
26 |
contest_names = curr_info['Contest Name']
|
27 |
contest_id_map = dict(zip(curr_info['Contest Name'], curr_info['Contest ID']))
|
28 |
contest_date_map = dict(zip(curr_info['Contest Name'], curr_info['Date']))
|