-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: deprecate obj argument in GroupBy.get_group #53571
DEPR: deprecate obj argument in GroupBy.get_group #53571
Conversation
@rhshadrach, could you please take a look at this pr? |
pandas/core/groupby/groupby.py
Outdated
|
||
Returns | ||
------- | ||
same type as obj | ||
DataFrame |
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.
Small issue: I think that it returns Series or DataFrame
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.
thanks, I rolled back my changes there completely.
Thanks for the PR! This is indeed how the code should look after the deprecation is enforced. However we need to first introduce the deprecation so as to not break any user code but rather warn them about the change. If you're unfamiliar with this, I would suggest looking at merged PRs with the "Deprecate" label to get a better sense as to what this entails. |
Thank you, @rhshadrach for the comment. Sorry, my fault, I corrected my pr. Could you please take a look at update. |
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.
Looks good; could you add a test for the warning? I'd recommend placing it in tests/groupby/test_groupby.py
.
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.
lgtm
Thank you @rhshadrach for reviewing this. Sorry for the delay with adding the test. |
obj
argument inGroupBy.get_group
#53545obj
argument was deprecated inGroupBy.get_group
and removed from the parameters inGroupBy.get_group
docs.