I have the following dataframes:
df1
index | colA | colB
0 a 1
1 b 2
2 a 9
df2
index | colA | colB
5 a 3
8 c 4
I want to update df1 based on df2, meaning for all rows "i" such that
df1['ColA'].iloc[i] == df2['colB'].iloc[i]
The index do not match so .update() does not work here.
Desired output:
df1
index | colA | colB
0 a 3
1 b 2
2 a 3