Skip to content

Commit 455f34d

Browse files
authored
DOC: Add notes about M and Y to to_timedelata documentation. (#34968) (#34979)
* DOC: Add notes about M and Y to to_timedelata documentation. (#34968) * DOC: Update notes about M and Y to to_timedelata documentation. (#34968) * DOC: Add notes about M and Y to to_timedelata documentation. (#34968)
1 parent ad63b97 commit 455f34d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/core/tools/timedeltas.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ def to_timedelta(arg, unit=None, errors="raise"):
2525
Parameters
2626
----------
2727
arg : str, timedelta, list-like or Series
28-
The data to be converted to timedelta.
28+
The data to be converted to timedelta. The character M by itself,
29+
e.g. '1M', is treated as minute, not month. The characters Y and y
30+
are treated as the mean length of the Gregorian calendar year -
31+
365.2425 days or 365 days 5 hours 49 minutes 12 seconds.
2932
unit : str, optional
3033
Denotes the unit of the arg for numeric `arg`. Defaults to ``"ns"``.
3134

0 commit comments

Comments
 (0)