I would like to turn a dataframe column with unique identifiers into multiple rows (one row for each unique identifier)
Example:
V1 V2 Unique
5 12 1
10 15 1
20 35 1
40 50 2
60 70 2
100 50 2
What I need is:
row1 5 10 20
row2 40 60 100
Essentially I would like a row of V1 (ordering from left to right for first to last match) when Unique is the same (ignoring V2 entirely)
Thanks in advance.