-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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: Passing a dictionary to SeriesGroupBy.agg #52268
Conversation
I don't see a feasible way to use a single template for both SeriesGroupBy.agg and DataFrameGroupBy.agg, so I split it into two. Is there one, or should these be split? |
pandas/core/groupby/groupby.py
Outdated
- function | ||
- string function name | ||
- list of functions and/or function names, e.g. ``[np.sum, 'mean']`` | ||
- dict of axis labels -> functions, function names or list of such. |
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.
Should we remove this line specifically because passing dicts here is being deprecated?
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.
For most cases, my preference would be to have the User Guide reflect how we would like users to use pandas (so deprecations are to be removed) and the API docs to be an accurate reflection of the current arguments/behavior (so deprecations should not be removed). If there are other opinions here, maybe we should make an issue to discuss.
However, in this case dict
already doesn't work for SeriesGroupBy.agg when as_index=True
(the default), so this one is a bit of a grey area. I'm good with removing here and will update.
Thanks @rhshadrach |
* DEPR: Passing a dictionary to SeriesGroupBy.agg * fixup * Remove dict, fixup * fixup frame docstring
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.