I have 2 pandas dataframes
df1 = pd.DataFrame({'A': [1, 3, 5], 'B': [3, 4, 5]})
df2 = pd.DataFrame({'A': [1, 2, 3, 4, 5], 'B': [8, 9, 10, 11, 12], 'C': ['K', 'D', 'E', 'F', 'G']})
The index of both the data-frames is 'A'.
How to replace values of df1's column 'B' with values of df2 in column 'B'?
RESULT of df1:
A B
1 8
3 10
5 12