dete_resignations['institute_service'] = dete_resignations['cease_date'] - dete_resignations['dete_start_date'] dete_resignations['institute_service'].head()
What I expected to happen:
I expect the code will work but it does not.
What actually happened:
UFuncTypeError: ufunc 'subtract' cannot use operands with types dtype('<M8[ns]') and dtype('float64')
As my understanding from above error, the issue because of different datatype (<M8[ns]) and float) that we can not subtract. However my code show both columns are int64 type, why does it show <M8[ns] type? How should I correct it.
Below are results when I print column for cease date and start date of DETE Surveys:
Name: cease_date, dtype: int64
Name: dete_start_date, dtype: int64
I also try to do this project on my local computer but it shows the same error.
Thanks so much in advance