Skip to content

Commit fb86932

Browse files
DOC: timedelta return type (#44592)
* DOC: change return type #42316 * DOC: updating docstring * Doc changing the Returns docstring to adhere to to_datetime structure * DOC: combining types
1 parent 8c17c1b commit fb86932

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/core/tools/timedeltas.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,13 @@ def to_timedelta(arg, unit=None, errors="raise"):
6868
6969
Returns
7070
-------
71-
timedelta64 or numpy.array of timedelta64
72-
Output type returned if parsing succeeded.
71+
timedelta
72+
If parsing succeeded.
73+
Return type depends on input:
74+
75+
- list-like: TimedeltaIndex of timedelta64 dtype
76+
- Series: Series of timedelta64 dtype
77+
- scalar: Timedelta
7378
7479
See Also
7580
--------

0 commit comments

Comments
 (0)