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: removed deprecated argument obj from GroupBy get_group #57136

Merged

Conversation

natmokval
Copy link
Contributor

@natmokval natmokval assigned natmokval and unassigned natmokval Jan 29, 2024
@natmokval natmokval added the Deprecate Functionality to remove in pandas label Jan 29, 2024
@natmokval natmokval marked this pull request as ready for review January 30, 2024 09:39
@natmokval natmokval requested a review from rhshadrach as a code owner January 30, 2024 09:39
@natmokval
Copy link
Contributor Author

@MarcoGorelli, could you please take a look at this PR? CI failures aren't related to my changes.

stacklevel=find_stack_level(),
)
return obj._take_with_is_copy(inds, axis=self.axis)
raise ValueError("cannot pass argument obj to get_group")
Copy link
Member

Choose a reason for hiding this comment

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

Sorry if I missed any conversations on this but I am fairly certain you can just remove the obj=None parameter from the function definition and then remove this if...else block altogether

Copy link
Member

Choose a reason for hiding this comment

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

Agreed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you, I removed the parameter obj from the definition of get_group, the block if...else and corrected docstring.

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Looks good!


Removal of prior version deprecations/changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Removed deprecated argument ``obj`` in :meth:`GroupBy.get_group` (:issue:`53545`)
Copy link
Member

@rhshadrach rhshadrach Jan 30, 2024

Choose a reason for hiding this comment

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

In order to resolve a link to the documentation, can you replace the end with

:meth:`.DataFrameGroupBy.get_group` and :meth:`.SeriesGroupBy.get_group`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you, I corrected the note in v3.0.0.rst

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

@rhshadrach rhshadrach added this to the 3.0 milestone Jan 31, 2024
@rhshadrach rhshadrach merged commit db11e25 into pandas-dev:main Jan 31, 2024
53 of 54 checks passed
@rhshadrach
Copy link
Member

Thanks @natmokval!

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 Groupby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants