Fix Python – extracting days from a numpy.timedelta64 value
I am using pandas/python and I have two date time series s1 and s2, that have been generated using the ‘to_datetime’ function on a field of the df containing dates/times.
When I subtract s1 from s2
s3 = s2 – s1
I get a series, s3, of type
timedelta64[ns]
0 385 days, 04:10:36
1 57 days, 22:54:00
2 642 days, 21:15:23
3 615 days, 00….