In a data, frame match two-column and if any value from the second column is available in the first column, remove value from the second columns
col1 col2
1
2 1
3 9
4
5 1
6 2
Output
col1 col2
1
2
3 9
4
5
6
Here, 1 and 2 from col2 are available in col1. So, this repeated data should be removed