I have a dataframe called REF with the following structure:
old_id new_id
3 6
4 7
5 8
I want to replace all the values that can be found equal to any of the old_id values in another dataframe NEW that is:
old_id column_1 column_2
3 a e
4 b f
9 c g
9 d h
Therefore the new output dataset NEW will be:
old_id column_1 column_2
6 a e
7 b f
9 c g
9 d h