-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: PeriodIndex ordinal, fields keywords #55963
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
Conversation
@@ -146,7 +148,7 @@ class PeriodIndex(DatetimeIndexOpsMixin): | |||
|
|||
Examples | |||
-------- | |||
>>> idx = pd.PeriodIndex(year=[2000, 2002], quarter=[1, 3]) | |||
>>> idx = pd.PeriodIndex.from_fields(year=[2000, 2002], quarter=[1, 3]) |
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.
Could you add a .. deprecated 2.2.0
directive in the docstring for the fields?
@@ -280,6 +295,39 @@ def __new__( | |||
|
|||
return cls._simple_new(data, name=name, refs=refs) | |||
|
|||
@classmethod | |||
def from_fields( |
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.
Could you add this method and from_ordinals
to the API reference?
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.
updated+green
Thanks @jbrockmendel |
* DEPR: PeriodIndex ordinal, fields keywords * lint fixups * update doctest * doc updates
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.