pandas.Timedelta.unit#

Timedelta.unit#

Return the unit of Timedelta object.

The unit of Timedelta object is nanosecond, i.e., ‘ns’ by default.

Returns:
str

See also

Timedelta.value

Return the value of Timedelta object in nanoseconds.

Timedelta.as_unit

Convert the underlying int64 representation to the given unit.

Examples

>>> td = pd.Timedelta(42, unit='us')
'ns'