Python pandas groupby aggregate on multiple columns, then pivot
Edited for Pandas 0.22+ considering the deprecation of the use of dictionaries in a group by aggregation. We set up a very similar dictionary where we use the keys of the dictionary to specify our functions and the dictionary itself to rename the columns. option 1use agg ← link to docs option 2more for lessuse describe ← link to … Read more