pandas to find duplicate in 2 excel code example Example: print duplicates elements in column pandas mask = df.columnname.duplicated(keep=False) print (df[mask])