Here is the data frame:
Name| File amount| other amount | other name
A 123 48 a
B 456 48 a
C 789 49 a
A 48 b
A 48 c
B 48 d
What I want is the following:
Name is the ID and each name must have a column 'file amount', and what I want is group all the lines together based on Name, and put 'other name' on the right side if they have more than 1 column, add on the right side. and leave blank if they don't have the 'other name'.
Name| File amount| other_1| other_1 amount| other_2| other_2 amount| other_3| other_3 amount
A 123 a 48 b 48 c 48
B 456 a 48 d 48
C 789 a 49