W3cubDocs

/pandas 0.25

pandas.Timedelta.to_pytimedelta

Timedelta.to_pytimedelta()

Convert a pandas Timedelta object into a python timedelta object.

Timedelta objects are internally saved as numpy datetime64[ns] dtype. Use to_pytimedelta() to convert to object dtype.

Returns:
datetime.timedelta or numpy.array of datetime.timedelta

See also

to_timedelta
Convert argument to Timedelta type.

Notes

Any nanosecond resolution will be lost.

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Timedelta.to_pytimedelta.html