DataFrame groupby-aggregate strategy

If I understand your problem correctly this is the way to do it. If you want to get the first maximum write:

combine(sdf -> sdf[argmax(sdf.a), [;a, :b]], groupby(df, :c))

and if you want all rows:

combine(sdf -> sdf[findall(==maximum(sdf.a), sdf.a), [;a, :b]], groupby(df, :c))
4 Likes