I want to groupby a single column, and then use agg
with mean for a couple of columns, but just select first
or last
for the remaining columns. This is possible in pandas, but isn't currently supported in Dask. How to do this? Thanks.
aggs = {'B': 'mean', 'C': 'mean', 'D': 'first', 'E': 'first'}
ddf.groupby(by='A').agg(aggs)