I want to filter through a dataframe in python of 3 columns. I want only the rows for which the first two columns are the same but not the third one. i.e.
A B C
1 4 2
1 5 3
2 3 3
3 1 1
4 3 2
2 3 5
On the above example, I would like to get only rows 3 and 6 since the first two columns match.