@@ -21,18 +21,18 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
21
21
Convert argument to timedelta.
22
22
23
23
Timedeltas are absolute differences in times, expressed in difference
24
- units e.g. days, hours, minutes, seconds. This method converts an argument
24
+ units e.g. ( days, hours, minutes, seconds) . This method converts an argument
25
25
from a recognized timedelta format / value into a Timedelta type.
26
26
27
27
Parameters
28
28
----------
29
- arg : str, timedelta, list, tuple, 1-d array, or Series
29
+ arg : str, timedelta, list, tuple, 1-d array, or Series
30
30
The argument which needs to be converted to timedelta.
31
31
unit : str, default 'ns'
32
32
Denotes the unit (D,h,m,s,ms,us,ns) of the arg.
33
33
box : bool, default True
34
34
- If True returns a Timedelta/TimedeltaIndex of the results.
35
- - if False returns a np.timedelta64 or ndarray of values of dtype
35
+ - If False returns a np.timedelta64 or ndarray of values of dtype
36
36
timedelta64[ns].
37
37
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
38
38
- If 'raise', then invalid parsing will raise an exception.
@@ -41,7 +41,8 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
41
41
42
42
Returns
43
43
-------
44
- ret : timedelta64/arrays of timedelta64 if parsing succeeded
44
+ timedelta64 or numpy.array of timedelta64
45
+ Output type returned if parsing succeeded.
45
46
46
47
See Also
47
48
--------
0 commit comments