I have two data frames, df1 and df2.
df1 df2
A B C D E
ad df ad se 1
ad se xc je 2
xc je ad df 3
... ...
I need to create a new column in df1 with the values contained in column E from df2. For this, I need to find the matching values between columns A and C, and from B and D from df1 and df2 respectively.
where A == C & B == D
XX = E
The result should be like this:
df1
A B XX
ad df 3
ad se 1
xc je 2
...
This might be straightforward but I'm quite new to pandas and haven't really found a way to accomplish this.
Any advice is very welcome!