BUG: Bug in consistency of groupby aggregation when passing a custom function (GH6715)
closes #6715

@jorisvandenbossche works but is a big hacky
 Thanks! Will test it this evening.
 For `g.agg(P1)` it does work, but `g.apply(P1)` not yet (or this way maybe not meant to fix that?). It just seems intuitive if you can do `df.apply(P1`, that you also can do `g.apply(P1)`
 `g.apply(P1)` is correct as it is passed as a full dataframe (and not series by series). I don't see a way to avoid doing that. The paths groupby takes are pretty complicated. So not going to be able to fix. If you want to create a separeate issue maybe can address in 0.15.
