-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
API DesignApplyApply, Aggregate, Transform, MapApply, Aggregate, Transform, MapEnhancementGroupbyNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
Issues where agg
is used with non-reducing functions:
- Behavior of new df.agg, df.transform and df.apply is very inconsistent #18103
- groupby agg with rank and parameter return does not reduce #14741
- BUG: DataFrame.agg with multiple cum functions creates wrong result #35490
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 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).self.grouper.result_index
.
MarcoGorelli
Metadata
Metadata
Assignees
Labels
API DesignApplyApply, Aggregate, Transform, MapApply, Aggregate, Transform, MapEnhancementGroupbyNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action