Reputation: 181
I am writing a single entry from a column of a data frame
2011100101 is interpreted as 1 AM of 1st October 2011.
I want it to change in the format as YYYY-Mmm-dd HH
train['date1']=datetime.strptime(train['ID'], '%Y%m%d%H')
but getting an error TypeError: strptime() argument 1 must be string, not Series
How to change in the required format for the entire entries in a single column?
Upvotes: 13
Views: 34465