Consider a dataframe which consists of various columns, but I would want to filter the dataframe by comparing values of two columns. Here below is the sample of dataframe .
Machine Position
M01 PB0
M02 PB0
M03 PB0
M04 PB0
M01 PB1
M02 PB1
M01 PB1
M01 PB1
Above you can see All machines have Position PB0 but only two machines has both PB0 and PB1, now I would expect maybe a list of machines which has both PB0 and PB1
machine=['M01','M02']
One thing to consider is among these two columns there could be many duplicates.