I have a dataframe 'df1' that looks like:
Number | Variable1 | Variable | Variable3 |
---|---|---|---|
1 | A | B | C |
2 | A | B | C |
3 | A | B | C |
4 | A | B | C |
5 | A | B | C |
And I have a second dataframe 'df2' that looks like:
Number | Variable1 | Variable | Variable3 |
---|---|---|---|
1 | D | E | F |
2 | G | H | I |
3 | J | K | L |
4 | M | N | O |
15 | P | Q | R |
I want to update the three Variable columns in df1 with the data in the Variable columns in df2 based on matching values in Number so that df1 ends up looking like:
Number | Variable1 | Variable | Variable3 |
---|---|---|---|
1 | D | E | F |
2 | G | H | I |
3 | J | K | L |
4 | M | N | O |
5 | A | B | C |