I have 2 dataframes like this:
name code phone_number
Joe BX13 03453
Bill C308 321356
Donald H314 34532
Mike J4D6 2134
code vehicle
C308 Mercedes
H314 BMW
I would like to concatenate them but only for common values in a specific column so it would look like this:
name code vehicle
Bill C308 Mercedes
Donald H314 BMW
df3=pd.concat([df1, df2])
looks promising but I don't know to specify that I only want the common values. What arguments should I put in the parenthesis?