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

ENH: Improve error message when constructing period with invalid freq #55940

Conversation

natmokval
Copy link
Contributor

@natmokval natmokval commented Nov 13, 2023

xref #55792, #52064

Improved error message when constructing period with offsets frequencies deprecated for period such as "ME" or "YE-DEC".

the reason: we see the error message: Invalid frequency: "..." instead of the message: for Period, please use "..." instead of "..."

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

@MarcoGorelli, could you please take a look at this PR?

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.

Awesome stuff, I love a good error message before all these deprecations hit users

The if name.startswith complexity will disappear after the deprecation cycle

@MarcoGorelli MarcoGorelli added this to the 2.2 milestone Nov 14, 2023
@MarcoGorelli MarcoGorelli merged commit 8a814a0 into pandas-dev:main Nov 14, 2023
48 checks passed
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.

None yet

2 participants