Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Add notes about M and Y to to_timedelata documentation. (#34968) #34979

Merged
merged 3 commits into from
Sep 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pandas/core/tools/timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def to_timedelta(arg, unit=None, errors="raise"):
Parameters
----------
arg : str, timedelta, list-like or Series
The data to be converted to timedelta.
The data to be converted to timedelta. Note that the character M
is treated as minute, not month. The characters Y and y are treated
as the mean length of the Gregorian calendar year - 365.2425 days or
365 days 5 hours 49 minutes 12 seconds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
365 days 5 hours 49 minutes 12 seconds
365 days 5 hours 49 minutes 12 seconds.

unit : str, optional
Denotes the unit of the arg for numeric `arg`. Defaults to ``"ns"``.

Expand Down