@@ -26,18 +26,19 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
2626 Parameters
2727 ----------
2828 arg : str, timedelta, list-like or Series
29- The argument which needs to be converted to timedelta.
29+ The data to be converted to timedelta.
3030 unit : str, default 'ns'
31- ('Y', 'M', 'W', 'D', 'days', 'day', 'hours', hour', 'hr',
32- 'h', 'm', 'minute', 'min', 'minutes', 'T', 'S', 'seconds',
33- 'sec', 'second', 'ms', 'milliseconds', 'millisecond',
34- 'milli', 'millis', 'L', 'us', 'microseconds', 'microsecond',
35- 'micro', 'micros', 'U', 'ns', 'nanoseconds', 'nano', 'nanos',
36- 'nanosecond', 'N').
31+ Denotes the unit of the arg. Possible values:
32+ ('Y', 'M', 'W', 'D', 'days', 'day', 'hours', hour', 'hr',
33+ 'h', 'm', 'minute', 'min', 'minutes', 'T', 'S', 'seconds',
34+ 'sec', 'second', 'ms', 'milliseconds', 'millisecond',
35+ 'milli', 'millis', 'L', 'us', 'microseconds', 'microsecond',
36+ 'micro', 'micros', 'U', 'ns', 'nanoseconds', 'nano', 'nanos',
37+ 'nanosecond', 'N').
3738 box : bool, default True
38- If True returns a Timedelta/TimedeltaIndex of the results.
39- If False returns a np .timedelta64 or ndarray of values of dtype
40- timedelta64[ns].
39+ - If True returns a Timedelta/TimedeltaIndex of the results.
40+ - If False returns a numpy .timedelta64 or numpy.darray of
41+ values of dtype timedelta64[ns].
4142 errors : {'ignore', 'raise', 'coerce'}, default 'raise'
4243 - If 'raise', then invalid parsing will raise an exception.
4344 - If 'coerce', then invalid parsing will be set as NaT.
@@ -83,12 +84,6 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
8384
8485 >>> pd.to_timedelta(np.arange(5), box=False)
8586 array([0, 1, 2, 3, 4], dtype='timedelta64[ns]')
86- <<<<<<< HEAD
87-
88- See also
89-
90- =======
91- >>>>>>> improved styling
9287 """
9388 unit = parse_timedelta_unit (unit )
9489
0 commit comments