pandas.to_timedelta — pandas 0.24.0rc1 documentation (original) (raw)

Parameters:

arg : str, timedelta, list-like or Series

The data to be converted to timedelta.

unit : str, default ‘ns’

Denotes the unit of the arg. Possible values: (‘Y’, ‘M’, ‘W’, ‘D’, ‘days’, ‘day’, ‘hours’, hour’, ‘hr’, ‘h’, ‘m’, ‘minute’, ‘min’, ‘minutes’, ‘T’, ‘S’, ‘seconds’, ‘sec’, ‘second’, ‘ms’, ‘milliseconds’, ‘millisecond’, ‘milli’, ‘millis’, ‘L’, ‘us’, ‘microseconds’, ‘microsecond’, ‘micro’, ‘micros’, ‘U’, ‘ns’, ‘nanoseconds’, ‘nano’, ‘nanos’, ‘nanosecond’, ‘N’).

box : bool, default True

errors : {‘ignore’, ‘raise’, ‘coerce’}, default ‘raise’