Groupby value counts on the dataframe pandas

PHOTO EMBED

Fri Jul 02 2021 08:01:09 GMT+0000 (Coordinated Universal Time)

Saved by @pmv #python

df.groupby(['id', 'group', 'term']).size().unstack(fill_value=0)
content_copyCOPY

https://stackoverflow.com/questions/39132742/groupby-value-counts-on-the-dataframe-pandas