I have two dataframes, one in the form of:
# X Y
1 2 0.0
2 5 0.0
3 10 0.0
4 15 0.0
5 17 0.0
6 21 0.0
and one in the form of:
A B C
1 4 2
2 5 3
3 6 4
I want to replace all the ABC values from the second dataframe, with the X values; so I want go over the ABC df and if the number matches the # of df1 to replace it with the X value
the end table should look:
A B C
2 15 5
5 17 10
10 21 15
is there a way I can do it?