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 mypy
  • Loading branch information
luke committed Jan 20, 2023
commit 76a675cbe1e1a46a0fa672a2780fb6c6c30e7274
6 changes: 4 additions & 2 deletions pandas/core/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,9 @@ def _check_arg(callable: Callable, arg: str) -> bool:
return arg in args_names


def _recreate_func(callable_list: list[Callable], kwargs: dict) -> list[partial[Any]]:
def _recreate_func(
callable_list: list[Callable], kwargs: dict
) -> list[partial[Any]] | Callable[[Any], Any]:
# GH 50624
"""Recreate callable with kwargs.

Expand All @@ -1549,7 +1551,7 @@ def _recreate_func(callable_list: list[Callable], kwargs: dict) -> list[partial[

Returns
-------
list[[partial[Any]]
list[partial[Any]] | Callable[[Any], Any]

Examples
--------
Expand Down
0