how to check combination of two columns unique in pandas code example
Example: number of unique pairs in columns pandas
#df named df1 columns A and B
df1.groupby(['A','B']).size().reset_index().rename(columns={0:'count'})
#df named df1 columns A and B
df1.groupby(['A','B']).size().reset_index().rename(columns={0:'count'})