I'd like to merge (update?) two DataFrames on specific rows and columns.
First DataFrame A:
A B C D E
a aa s
b bb s
c cc
d dd
e ee
...
Second DataFrame B:
A C D E
b s s
d s s
Expected result:
A B C D E
a aa s
b bb s s s
c cc
d dd s s
e ee
...
I don't remember when did I waste so much time trying to figure something out. My guess was to use:
pd.merge(A, B, on=['A', 'C', 'D', 'E'], how='left')
But it doesn't work. I can't find the help.
I'd like to point out that all the values are string, and that values don't overlap between A and B. Final DataFrame doesn't have any duplicated columns after the connection.