Let it be the following Python Panda DataFrame:
| ID | time | vector | other |
| ---- | ------- | ------------ | ----- |
| 0 | 81219 | [N1, N2, N3] | blue |
| 0 | 32323 | [N1, N4] | green |
| 1 | 423 | [N2, N3] | red |
| 1 | 4232 | [N1] | blue |
| 1 | 42424 | [N2, N2] | red |
| 2 | 42422 | [N3, N5] | blue |
I want to create a grouped DataFrame containing for each ID a column vector with the concatenation of the vectors for each element.
Example of the result:
| ID | vector |
| ---- | -------------------- |
| 0 | [N1, N2, N3, N1, N4] |
| 1 | [N2, N3, N1, N2, N2] |
| 2 | [N3, N5] |