Hello
I have the data in the format below:
For each ID, I need to put into an array all the origination and destination locations in time order, so that e.g.:
for ID=1, it will be {GB, US, DE, FR, DK, FI}
and
for ID=2 it will be {ES, RO, SE, IT}
Any neat way to do that without helper columns?
Thanks!
I have the data in the format below:
ID | Start | End | Origination | Destination |
1 | 01/01/2000 | 02/01/2000 | GB | US |
1 | 02/01/2000 | 03/01/2000 | DE | FR |
1 | 03/01/2000 | 04/01/2000 | DK | FI |
2 | 04/01/2000 | 05/01/2000 | ES | RO |
2 | 05/01/2000 | 06/01/2000 | SE | IT |
For each ID, I need to put into an array all the origination and destination locations in time order, so that e.g.:
for ID=1, it will be {GB, US, DE, FR, DK, FI}
and
for ID=2 it will be {ES, RO, SE, IT}
Any neat way to do that without helper columns?
Thanks!