Skip to content

ENH: groupby(...).agg should only accept reducers #35725

Open
@rhshadrach

Description

@rhshadrach

Issues where agg is used with non-reducing functions:

I think agg should raise if the function(s) provided are not reducers. This can be tested by if the resulting index is equal to self.grouper.result_index. always reduce regardless of the return value. That is, treat the result of the UDF as if it a scalar (even when it's not).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions