Skip to content
Advertisement

why am i getting TypeError: dtype datetime64[ns] cannot be converted to timedelta64[ns]?

The code:

JavaScript

i have lots of dates in a column which i want to convert to number of days but i simply keep getting errors. im new to pandas so sorry if the question is silly

JavaScript

but why am i getting errors and how to fix them.

JavaScript

Thank you

Advertisement

Answer

To get the number of days to now, use:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement