Pivot and convert rows to columns in pandas groupby
August 25, 2022
Links:
https://stackoverflow.com/questions/68475269/how-to-convert-rows-to-columns-in-a-pandas-groupby
# pivot args: 1st -> index, 2nd -> columns, 3rd -> values
df.pivot(["a", "b"], "c", "d").rename_axis(columns=None).reset_index()