I have a dataframe with this structure:
id v1 v1_2
1 4 .
2 5 .
3 9 7
4 9 6
5 2 .
And what I would like is to create a new column based on values from v1 and v1_2, so basically keeping the original value and if the original value is 9 then use the column of v1_2
id v1 v1_2 final
1 4 . 4
2 5 . 5
3 9 7 7
4 9 6 6
5 2 . 2
Thanks