For the below DataFrame:
| ID | Reg | Departure | Arrival | Date | Time |
|---|---|---|---|---|---|
| 1 | ABC | DUB | LCY | 22/0/22 | 15:23 |
| 2 | ABC | DUB | LCY | 22/0/22 | 15:27 |
| 3 | CBA | CPH | HEL | 22/0/22 | 12:21 |
| 4 | CBA | CPH | HE | 22/0/22 | 12:19 |
I would like to pivot so that it so that the resulting DataFrame is:
| ID | Reg | Departure | Arrival | Date | Time | ID2 | Time2 |
|---|---|---|---|---|---|---|---|
| 1 | ABC | DUB | LCY | 22/0/22 | 15:23 | 2 | 15:27 |
| 3 | CBA | CPH | HEL | 22/0/22 | 12:21 | 4 | 12:19 |
I've been playing around with GroupBy & Pivot but haven't managed to crack it, any help is appreciated!