8000 CLN: Remove "how" return from agg by rhshadrach · Pull Request #39786 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

CLN: Remove "how" return from agg #39786

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

Merged
merged 2 commits into from
Feb 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup for groupby
  • Loading branch information
rhshadrach committed Feb 13, 2021
commit 02cebc1f859d3476b281177d2f86618f2bb3b393
6 changes: 4 additions & 2 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up 7D81 @@ -46,6 +46,7 @@
ensure_platform_int,
is_bool,
is_categorical_dtype,
is_dict_like,
is_integer_dtype,
is_interval_dtype,
is_numeric_dtype,
Expand Down Expand Up @@ -963,9 +964,10 @@ def aggregate(self, func=None, *args, engine=None, engine_kwargs=None, **kwargs)

op = GroupByApply(self, func, args, kwargs)
result = op.agg()
if result is not None:
if not is_dict_like(func) and result is not None:
return result
else:

if result is None:

# grouper specific aggregations
if self.grouper.nkeys > 1:
Expand Down
0