pandas.Timedelta.unit#
- Timedelta.unit#
Return the unit of Timedelta object.
This is the resolution of the underlying int64 representation: one of
's','ms','us'or'ns'.- Returns:
- str
See also
Timedelta.valueReturn the value of Timedelta object in nanoseconds.
Timedelta.as_unitConvert the underlying int64 representation to the given unit.
Examples
>>> td = pd.Timedelta(42, unit='us') >>> td.unit 'us'