import pandas as pd
df = pd.DataFrame({'A': ['foo', 'foo', 'foo', 'bar'], 'B': [0, 1, 1, 1],
    'C': ['A', 'A', 'B', 'A']})
df.groupby(['A', 'C']).filter(lambda df: df.shape[0] == 1)
Drop all duplicate rows in Python Pandas