Skip to content

Commit 5c260da

Browse files
committed
improved styling
1 parent f186af0 commit 5c260da

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

pandas/core/tools/timedeltas.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,28 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
2626
2727
Parameters
2828
----------
29-
arg : String, timedelta, list, tuple, 1-d array, or Series
29+
arg : str, timedelta, list, tuple, 1-d array, or Series
3030
The argument which needs to be converted to timedelta.
31-
unit : Integer or float, default ns
31+
unit : str, default 'ns'
3232
Denotes the unit (D,h,m,s,ms,us,ns) of the arg.
33-
box : Boolean, default True
34-
If True returns a Timedelta/TimedeltaIndex of the results.
35-
if False returns a np.timedelta64 or ndarray of values of dtype
33+
box : bool, default True
34+
- If True returns a Timedelta/TimedeltaIndex of the results.
35+
- if False returns a np.timedelta64 or ndarray of values of dtype
3636
timedelta64[ns].
3737
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
38-
If 'raise', then invalid parsing will raise an exception.
39-
If 'coerce', then invalid parsing will be set as NaT.
40-
If 'ignore', then invalid parsing will return the input.
38+
- If 'raise', then invalid parsing will raise an exception.
39+
- If 'coerce', then invalid parsing will be set as NaT.
40+
- If 'ignore', then invalid parsing will return the input.
4141
4242
Returns
4343
-------
4444
ret : timedelta64/arrays of timedelta64 if parsing succeeded
4545
46+
See Also
47+
--------
48+
DataFrame.astype : Cast argument to a specified dtype.
49+
to_datetime : Convert argument to datetime.
50+
4651
Examples
4752
--------
4853
@@ -73,11 +78,6 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
7378
7479
>>> pd.to_timedelta(np.arange(5), box=False)
7580
array([0, 1, 2, 3, 4], dtype='timedelta64[ns]')
76-
77-
See also
78-
--------
79-
pandas.DataFrame.astype : Cast argument to a specified dtype.
80-
pandas.to_datetime : Convert argument to datetime.
8181
"""
8282
unit = _validate_timedelta_unit(unit)
8383

0 commit comments

Comments
 (0)