James McCool
commited on
Commit
·
28d3e56
1
Parent(s):
038b8a8
Update contest date mapping in grab_contest_names function for improved consistency
Browse files- Modified the contest_date_map to convert the 'Date' column to string format before replacing hyphens, ensuring consistent date representation.
- This change enhances data integrity and aligns with ongoing efforts to improve data processing within the application.
app.py
CHANGED
@@ -26,7 +26,7 @@ def grab_contest_names(db, sport):
|
|
26 |
curr_info['Date'] = curr_info['Date'].dt.strftime('%Y-%m-%d')
|
27 |
contest_names = curr_info['Contest Name']
|
28 |
contest_id_map = dict(zip(curr_info['Contest Name'], curr_info['Contest ID']))
|
29 |
-
contest_date_map = dict(zip(curr_info['Contest Name'], curr_info['Date'].replace('-', '')))
|
30 |
|
31 |
return contest_names, contest_id_map, contest_date_map, curr_info
|
32 |
|
|
|
26 |
curr_info['Date'] = curr_info['Date'].dt.strftime('%Y-%m-%d')
|
27 |
contest_names = curr_info['Contest Name']
|
28 |
contest_id_map = dict(zip(curr_info['Contest Name'], curr_info['Contest ID']))
|
29 |
+
contest_date_map = dict(zip(curr_info['Contest Name'], curr_info['Date'].astype(str).replace('-', '')))
|
30 |
|
31 |
return contest_names, contest_id_map, contest_date_map, curr_info
|
32 |
|