I have two different dataframes, both containing a common element (identifier). I want to copy data from df1 for each identifier in df2 (each identifier can repeat maximum 5 times in df1)
df1 ---data vertically
id_column value1
identifier1 some data1
identifier1 some data2
identifier1 some data3
identifier2 some data2
identifier2 some data1
identifier3 some data3
While df2 looks like this and this is how the information should be copied from df1:
df2 ---data horizontally
id_column new1 new2 new3
identifier1 some data1 some data2 some data3
identifier2 some data2 some data1
identifier3 some data3
Is there a way to do this with python?
Many thanks for any help