- API reference
- pandas arrays, scalars, and data types
- pandas.Timed...
pandas.Timedelta.to_numpy#
- Timedelta.to_numpy(dtype=None,copy=False)#
Convert the Timedelta to a NumPy timedelta64.
This is an alias method forTimedelta.to_timedelta64(). The dtype andcopy parameters are available here only for compatibility. Their valueswill not affect the return value.
- Returns:
- numpy.timedelta64
See also
Series.to_numpy
Similar method for Series.
Examples
>>>td=pd.Timedelta('3D')>>>tdTimedelta('3 days 00:00:00')>>>td.to_numpy()numpy.timedelta64(259200000000000,'ns')
On this page