-
-
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: removed deprecated argument obj
from GroupBy get_group
#57136
DEPR: removed deprecated argument obj
from GroupBy get_group
#57136
Conversation
@MarcoGorelli, could you please take a look at this PR? CI failures aren't related to my changes. |
pandas/core/groupby/groupby.py
Outdated
stacklevel=find_stack_level(), | ||
) | ||
return obj._take_with_is_copy(inds, axis=self.axis) | ||
raise ValueError("cannot pass argument obj to get_group") |
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.
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
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.
Agreed
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.
thank you, I removed the parameter obj
from the definition of get_group
, the block if...else
and corrected docstring.
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!
doc/source/whatsnew/v3.0.0.rst
Outdated
|
||
Removal of prior version deprecations/changes | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
- Removed deprecated argument ``obj`` in :meth:`GroupBy.get_group` (:issue:`53545`) |
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.
In order to resolve a link to the documentation, can you replace the end with
:meth:`.DataFrameGroupBy.get_group` and :meth:`.SeriesGroupBy.get_group`
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.
thank you, I corrected the note in v3.0.0.rst
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
Thanks @natmokval! |
obj
from GroupByget_group