8000 BUG: Fix agg ingore arg/kwargs when given list like func by luke396 · Pull Request #50863 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content
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
Next Next commit
Fix test failure
  • Loading branch information
luke committed Jan 29, 2023
commit 0daad25ec756ad8a3034b1d5d9e93d2b036a80e5
6 changes: 2 additions & 4 deletions pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,7 @@ def agg_list_like(self) -> DataFrame | Series:
args_pass, kwargs_pass, args_remain, kwargs_remain = _map_args(
a, args_remain, kwargs_remain
)
new_res = colg.aggregate(
a, self.axis, *args_pass, **kwargs_pass
)
new_res = colg.aggregate(a, *args_pass, **kwargs_pass)
else:
new_res = colg.aggregate(a)
results.append(new_res)
Expand All @@ -356,7 +354,7 @@ def agg_list_like(self) -> DataFrame | Series:
indices = []
for index, col in enumerate(selected_obj):
colg = obj._gotitem(col, ndim=1, subset=selected_obj.iloc[:, index])
new_res = colg.aggregate(arg, self.axis, *self.args, **self.kwargs)
new_res = colg.aggregate(arg, *self.args, **self.kwargs)
results.append(new_res)
indices.append(index)
keys = selected_obj.columns.take(indices)
Expand Down
0