First I have dataframe, named df1:
id part 1 1 2 1 3 2 4 3 5 3
and other dataframe, named df2 (id is an index):<