From a pandas DataFrame, when I extract the value of a specific timedelta
field, I receive an object of type numpy.timedelta64
:
>>> numpy_delta
numpy.timedelta64(-2700000000000,'ns')
I understand that this is numpy's representation for "-2700000000000 Nanoseconds". How can I create an object datetime.timedelta
from that numpy object to use it outside of numpy?
From my expectations, that solution should provide:
>>> datetime_timedelta
datetime.timedelta(days=-1, seconds=83700)