I would like to compare two columns and find common value sets in each column, then output the rows with the common values.
Let's say I have a dataframe with:
no.(col1) | Username (col2) | Referral(col3) | email(col4)
0 | john | mike | [email protected]
1 | peter | paul | [email protected]
2 | joan | patricia | [email protected]
3 | mike | john | [email protected]
The output would be "0 | john | mike | [email protected]
" and "3 | mike | john | [email protected]
" because they have the same values in col2
and col3
respectively.