pandas.Timedelta.to_numpy

pandas 3.1.1 · Arrays, scalars, and data types · method

Convert the duration to a NumPy timedelta64 scalar.

Call syntax

Timedelta.to_numpy(dtype=None, copy=False)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
dtype Optional
Positional or keyword
Default None
NoneType

Choose the data type for the input conversion or result.

copy Optional
Positional or keyword
Default False
bool

Control whether data is copied where the API supports that choice.

Returns

numpy.timedelta64