I have a data-frame like below and I want to group data based on second column
Condition
If a value in columnA appears in any row in columnB, replace that valu