GNU DatamashGNU Datamash works pretty well for me.
For example, here is a how to give a groupwise some of the values in column 3 grouped by the values in column 2. There are many other use cases.
$ echo "id,group,value
1,1,2
1,2,1" | datamash -t, --header-in --header-out --sort groupby 2 sum 3
GroupBy(group),sum(value)
1,3
2,1