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

[REVIEW] Deprecate inplace parameters in categorical methods #12824

Merged
merged 4 commits into from
Feb 24, 2023

Conversation

galipremsagar
Copy link
Contributor

Description

To get ready for pandas-2.0 compatibility, this PR deprecates inplace in the following APIs:

  • as_ordered
  • as_unordered
  • add_categories
  • remove_categories
  • set_categories
  • reorder_categories

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar added 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. 4 - Needs cuDF (Python) Reviewer improvement Improvement / enhancement to an existing function breaking Breaking change labels Feb 22, 2023
@galipremsagar galipremsagar requested a review from a team as a code owner February 22, 2023 17:53
@galipremsagar galipremsagar self-assigned this Feb 22, 2023
@@ -141,6 +141,13 @@ def as_ordered(self, inplace: bool = False) -> Optional[SeriesOrIndex]:
or return a copy of this categorical with
added categories.

.. deprecated:: 23.02
Copy link
Contributor

Choose a reason for hiding this comment

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

I see 23.02 here but 23.04 below, is this as intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, this is intentional. inplace here was deprecated in 23.02. This is just updating the docstring.

@brandon-b-miller
Copy link
Contributor

AFAICT this is just adding deprecation warnings, should this be non-breaking?

@galipremsagar galipremsagar added non-breaking Non-breaking change and removed breaking Breaking change labels Feb 24, 2023
@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Feb 24, 2023
@galipremsagar
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 8a7fb2f into rapidsai:branch-23.04 Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants