I have two dataframes
df1:
ID  col2 col3 type
123  1.   2.   T
132  3.   1.   N
111  2.   1.   U
df2
ID   A    B   
123  0.   3.   
111  2.   3.   
132  1.   2.   
df2 contains different information about the same ID but in different order
I wanted to create a new column in df2 named (type) and match the type column in df1. If it's the same ID to the one in df1, it should copy the same type (T, N or U) from df1. In another word, I need it to look like
ID   A    B  type
123  0.   3.   T
111  2.   3.   U
132  1.   2.   N
I tried
df2['Type'] = df2[df2.ID.isin(df1.ID)]
