-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Implement '_period_dtype_code' attribute to 'pandas._libs.tslibs.offsets.MonthBegin' #38859
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
Comments
you need to show versions and if you are building from source |
Hi Jeff, sorry, information added. |
There is no Period corresponding to MonthBegin. Monthly Periods use offsets.MonthEnd |
Hi, I have tried to check in the source, and I am not finding any Your answer seems to relate to the 2nd part of the error message: But what happens if the direct root cause is solved? Why not adding a |
There is not a one-to-one mapping between DateOffset subclasses and Periods. There are many DateOffsets for which there is no corresponding Period. MonthBegin is one of them. |
Yes I understand that, and I can understand that a Period can only point toward single DateOffset. |
@MarcoGorelli has the recent work in documenting what offsets are valid Periods address this? |
Almost All that needs doing to close this issue IMO is to, in pandas/pandas/_libs/tslibs/period.pyx Lines 2675 to 2677 in 39c69da
to replace "offset alias" with "period alias", and to change the link to Anyone fancy making a PR? |
Hi @MarcoGorelli , Thanks for the opportunity! Cheers, |
all that's needed is a 2-word change, it shouldn't take 2-3 weeks' time if anyone wants to make a PR, feel free to do so |
Can I take it @MarcoGorelli ? Or should I wait for @nandsha to comeback? |
go ahead, thanks @rsm-23 |
take |
Code...
... raises following error message:
Please, could an appropriate '_period_dtype_code' attribute be provided to 'pandas._libs.tslibs.offsets.MonthBegin' object to solve this error?
Thanks for your amazing lib!
Not building from sources (using anaconda)
The text was updated successfully, but these errors were encountered: