pyarrow.duration#

pyarrow.duration(unit)#

Create instance of a duration type with unit resolution.

Parameters
unitstr

One of โ€˜sโ€™ [second], โ€˜msโ€™ [millisecond], โ€˜usโ€™ [microsecond], or โ€˜nsโ€™ [nanosecond].

Returns
typepyarrow.DurationType

Examples

>>> import pyarrow as pa
>>> pa.duration('us')
DurationType(duration[us])
>>> pa.duration('s')
DurationType(duration[s])