Skip to content

DataFrameGroupBy.apply missing include_groups argument #1407

@rhshadrach

Description

@rhshadrach

Describe the bug

class DataFrameGroupBy(GroupBy[DataFrame], Generic[ByT, _TT]):
# error: Overload 3 for "apply" will never be used because its parameters overlap overload 1
@overload # type: ignore[override]
def apply( # pyrefly: ignore[bad-override]
self,
func: DFCallable1[P],
/,
*args: P.args,
**kwargs: P.kwargs,
) -> Series: ...

This method should have an include_groups argument which was added in pandas 2.2.0.

https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.DataFrameGroupBy.apply.html

Note this argument while be deprecated in pandas 3.x and then removed in pandas 4.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ApplyApply, Aggregate, TransformBugDataFrameDataFrame data structure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions