How to compare a particular column value with rest of the same column values within the same dataframe?
e.g- let a dataframe is df.
df= A B
1 1
2 0
1 0
1 1
2 0
So we have to first take column A, then pick one by one value and compare rest of the A value. Like, I take 1 and compare with rest of the value like [2,1,1,2] and I found 3rd and 4th value is same. So the result should give me for 1 is =
A
false
true
true
false
Now pick 2 as it is second element. Output of it will be
A
false
false
false
true
basically compare each element with all other elements
This same process will go for column B,C,D....
Would anyone give me any solution how to do it?