I am trying to merge two tables.
As figure below, I have two tables that table 1 has x,y,z,id1,id2 and table 2 has id, a,b
I want to merge these two tables into one final table(the last one)
if table 1 has one id columns, I think I can merge like below code
df_2.insert(0, 'x',df_2['id'].map(df_1.set_index('id')['x']))
df_2.insert(0, 'y',df_2['id'].map(df_1.set_index('id')['y']))
df_2.insert(0, 'y',df_2['id'].map(df_1.set_index('id')['z']))
but I am having trouble because table 1 has multiple 'ID' columns...
Please help me.
ps. sorry for my Poor English skills.


