Get unique combinations between 2 (or more!) columns and count occurences

PHOTO EMBED

Wed Aug 18 2021 14:11:03 GMT+0000 (Coordinated Universal Time)

Saved by @camillemarijon #python

df_sub = df[["col1", "col2"]]
df_sub = df_sub.dropna()
df_sub.groupby(['col1','col2']).size().reset_index().rename(columns={0:'count'})
content_copyCOPY

#guillaumeontaime #guillaumepresident #overflow