-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DEPR offsets: rename ‘Y’ to ‘YE' #55792
DEPR offsets: rename ‘Y’ to ‘YE' #55792
Conversation
@MarcoGorelli, could you please take a look at this PR? Looks like CI failures are unrelated to my changes ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment, but the rest looks good!
pandas/_libs/tslibs/offsets.pyx
Outdated
@@ -4762,6 +4763,13 @@ cpdef to_offset(freq, bint is_period=False): | |||
f"instead of \'{name}\'" | |||
) | |||
elif is_period is True and name in c_OFFSET_DEPR_FREQSTR: | |||
if name.startswith("A"): | |||
warnings.warn( | |||
f"\'{name}\' will be deprecated, please use " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change "will be deprecated" to "is deprecated and will be removed in a future version"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I changed the warning message and updated my PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @natmokval
The PRs pandas-dev#55792 (Y), pandas-dev#52064 (Q), and pandas-dev#55553 (M) deprecated the single letter version of the aliases in favour of the -end version of them. This table was missed as part of that work.
The PRs pandas-dev#55792 (Y), pandas-dev#52064 (Q), and pandas-dev#55553 (M) deprecated the single letter version of the aliases in favour of the -end version of them. Add a note to the offset table about deprecations.
xref #9586, #52064
Deprecated the alias denoting year end frequency “Y” for offsets in favour of “YE".