-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added date_time column #8
base: master
Are you sure you want to change the base?
Conversation
Added date_time column as per TODO, refactored Unit_Converter.py
Fixing typos in README.md fixed the typo in the main function of weather_scraper.py
else: | ||
return fahrenheit | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was exactly the same as temperature(), so i DRYed it and followed the pattern we used for precipitation.
row_dict['Date'] = date.strftime('%Y/%m/%d') | ||
row_dict['Time'] = time.strftime('%I:%M %p') | ||
row_dict['Date_time'] = ((time-blank)+date).strftime('%Y/%m/%d %I:%M:%S') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strftime will by default read a time and assume the date 1900/01/01, so i subtract that to get to 0000/00/00 and then all thats left is the timedelta of the time, which i then add to the date giving the full datetime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, can you delete the gitignore changes please? They are specific to your setup
Added date_time column as per TODO,
refactored Unit_Converter.py