I have this sample of a data_frame:
name,time_0
name,22/04/2014 00:44
OTROGUAPOSUELTO,22/04/2014 13:20
I want to parse time_0, but doing:
df = pd.read_csv(data_string,header=0,parse_dates='time_0', dayfirst=True)
brings me back an 'object' dtype for time_0, instead of a date_time object.
Anyone?
Thanks a lot for your help
Try this:
In [2]: df = pd.read_csv(data_string, header=0, parse_dates=[1], dayfirst=True)
In [3]: df.dtypes
Out[3]:
name object
time_0 datetime64[ns]
dtype: object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With