I have a dataset for which I want to create groups based on some marking values. As an example, the data set looks like thisinput
The values are ad in chronological sequence, with every value up to the value 'end' being one day. I'm trying to reorganise the data so that the values of the first column appear like this: output
At first, I assumed it would be a simple transpose problem, but I can't see any argument or parameter to specify that the groups are delimited by the value 'end'
As I type, it occurs to me that maybe a for loop could run through the values and reorganise them, using the 'end' value like a stop codon in DNA transcription, but I'd like to make sure the isn't a simpler way before I start down that road.