Skip to content

Commit 737ac0b

Browse files
committed
Final fixes and Fixed merge conflict/included recent upstream changes
1 parent f85f0f6 commit 737ac0b

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

pandas/core/tools/timedeltas.py

+13-11
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,24 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise'):
1919
Convert argument to timedelta.
2020
2121
Timedeltas are absolute differences in times, expressed in difference
22-
units e.g. (days, hours, minutes, seconds). This method converts an argument
23-
from a recognized timedelta format / value into a Timedelta type.
22+
units (e.g. days, hours, minutes, seconds). This method converts
23+
an argument from a recognized timedelta format / value into
24+
a Timedelta type.
2425
2526
Parameters
2627
----------
27-
arg : string, timedelta, list, tuple, 1-d array, or Series
28+
arg : str, timedelta, list-like or Series
29+
The argument which needs to be converted to timedelta.
2830
unit : str, default 'ns'
29-
Possible values:
30-
{'Y', 'M', 'W', 'D', 'days', 'day', 'hours', hour', 'hr', 'h',
31-
'm', 'minute', 'min', 'minutes', 'T', 'S', 'seconds', 'sec', 'second',
32-
'ms', 'milliseconds', 'millisecond', 'milli', 'millis', 'L',
33-
'us', 'microseconds', 'microsecond', 'micro', 'micros', 'U',
34-
'ns', 'nanoseconds', 'nano', 'nanos', 'nanosecond', 'N'}
35-
box : Boolean, default True
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').
37+
box : bool, default True
3638
If True returns a Timedelta/TimedeltaIndex of the results.
37-
if False returns a np.timedelta64 or ndarray of values of dtype
39+
If False returns a np.timedelta64 or ndarray of values of dtype
3840
timedelta64[ns].
3941
errors : {'ignore', 'raise', 'coerce'}, default 'raise'
4042
- If 'raise', then invalid parsing will raise an exception.

0 commit comments

Comments
 (0)