Skip to content

Commit 096a309

Browse files
committed
Additional small fixes
1 parent 737ac0b commit 096a309

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

pandas/core/tools/timedeltas.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,24 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
2121
Timedeltas are absolute differences in times, expressed in difference
2222
units (e.g. days, hours, minutes, seconds). This method converts
2323
an argument from a recognized timedelta format / value into
24-
a Timedelta type.
24+
a Timedelta type.s
2525
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.

0 commit comments

Comments
 (0)