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

DEPR offsets: rename ‘Y’ to ‘YE' #55792

Merged
merged 15 commits into from
Nov 9, 2023

Conversation

natmokval
Copy link
Contributor

xref #9586, #52064
Deprecated the alias denoting year end frequency “Y” for offsets in favour of “YE".

@natmokval natmokval marked this pull request as ready for review November 2, 2023 08:21
@natmokval natmokval added Deprecate Functionality to remove in pandas Frequency DateOffsets labels Nov 2, 2023
@natmokval
Copy link
Contributor Author

@MarcoGorelli, could you please take a look at this PR? Looks like CI failures are unrelated to my changes (test_dti_ambiguous_matches_timestamp in pandas/tests/indexes/datetimes/test_constructors.py failed).

doc/source/whatsnew/v2.2.0.rst Outdated Show resolved Hide resolved
pandas/_libs/tslibs/offsets.pyx Outdated Show resolved Hide resolved
Copy link
Member

@MarcoGorelli MarcoGorelli left a 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!

@@ -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 "
Copy link
Member

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"?

Copy link
Contributor Author

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.

@MarcoGorelli MarcoGorelli added this to the 2.2 milestone Nov 9, 2023
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @natmokval

tacaswell added a commit to tacaswell/pandas that referenced this pull request May 29, 2024
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.
tacaswell added a commit to tacaswell/pandas that referenced this pull request May 29, 2024
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.
MarcoGorelli pushed a commit that referenced this pull request May 31, 2024
DOC: Add note about alias deprecations

The PRs #55792 (Y), #52064 (Q), and #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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Frequency DateOffsets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: deprecate the alias 'A' in favour of 'Y' for year end frequency
2 participants