I try to read a CSV from the link https://raw.githubusercontent.com/LinkedInLearning/data_cleaning_python_2883183/main/Ch04/challenge/traffic.csv
df = pd.read_csv('https://raw.githubusercontent.com/LinkedInLearning/data_cleaning_python_2883183/main/Ch04/challenge/traffic.csv', parse_dates=['time'])
But, the time column is still in string format.
df.dtypes
[output]
ip object
time object
path object
status int64
size int64
dtype: object
Interestingly, when I read a similar csv from a different url, it works. So
df = pd.read_csv('https://raw.githubusercontent.com/LinkedInLearning/data_cleaning_python_2883183/main/Ch04/solution/traffic.csv', parse_dates=['time'])
indeed converts the time column to a datetime object. Why does parse_dates fail in the first link and how can I fix it?