Closed GBarnsley closed 4 years ago
@GBarnsley good spot, thanks! Actually, this was caused by a data update having a different date format. Format now fixed as ISO %Y-%m-%d. Will Pandas barf if another date format is offered, I wonder?
Yeah it will break if the day, month, year order changes
Good! We'll then know the format has changed.
Function load_commute_volume in pydata.py doesn't work correctly. The sort_index sorts by day not date so it ends up in the wrong order and commute.merge doesn't correctly match several dates. Adding "commute_raw.index = pd.to_datetime(commute_raw.index, format = '%d/%m/%Y')" just after "commute_raw = pd.read_csv(filename, index_col='date')", changes the index to a datetime format, allowing the sorting and merging to work correctly.