I have the following dataframe.
Date Returned Start Date
0 2017-06-02 2017-04-01
1 2017-06-02 2017-04-01
2 2017-06-02 2017-04-01
3 2017-06-02 2017-02-28
4 2017-06-02 2017-02-28
5 2017-06-02 2016-07-20
6 2017-06-02 2016-07-20
Both columns are type datetime64
.
subframe[['Date Returned','Start Date']].dtypes
Out[9]:
Date Returned datetime64[ns]
Start Date datetime64[ns]
dtype: object
Yet when I try to find the timedeltas between the two columns of dates, I get this error.
subframe['Delta']=subframe['Date Returned'] - subframe['Start Date']
TypeError: data type "datetime" not understood
Is there a fix for this? I've tried everything I can think of and have pulled out most of my hair at this point. Any help is greatly appreciated. I did find someone posting the same problem, but no one really answered it.