@@ -37,14 +37,19 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
37
37
if False returns a np.timedelta64 or ndarray of values of dtype
38
38
timedelta64[ns].
39
39
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
40
- If 'raise', then invalid parsing will raise an exception.
41
- If 'coerce', then invalid parsing will be set as NaT.
42
- If 'ignore', then invalid parsing will return the input.
40
+ - If 'raise', then invalid parsing will raise an exception.
41
+ - If 'coerce', then invalid parsing will be set as NaT.
42
+ - If 'ignore', then invalid parsing will return the input.
43
43
44
44
Returns
45
45
-------
46
46
ret : timedelta64/arrays of timedelta64 if parsing succeeded
47
47
48
+ See Also
49
+ --------
50
+ DataFrame.astype : Cast argument to a specified dtype.
51
+ to_datetime : Convert argument to datetime.
52
+
48
53
Examples
49
54
--------
50
55
@@ -75,11 +80,6 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
75
80
76
81
>>> pd.to_timedelta(np.arange(5), box=False)
77
82
array([0, 1, 2, 3, 4], dtype='timedelta64[ns]')
78
-
79
- See also
80
- --------
81
- pandas.DataFrame.astype : Cast argument to a specified dtype.
82
- pandas.to_datetime : Convert argument to datetime.
83
83
"""
84
84
unit = parse_timedelta_unit (unit )
85
85
0 commit comments