I have a data frame which formatted like this:
- | Name | 0 | 1 | 2 | 3 |
---|---|---|---|---|---|
0 | John | object 1 | object 2 | Object 3 | object 4 |
1 | Smith | object 1 | object 2 | Object 3 | object 4 |
2 | Jack | object 1 | object 2 | Object 3 | object 4 |
and I want to transform it to the following:
- | Name | 0 |
---|---|---|
0 | John | object1 |
1 | John | object2 |
2 | John | object3 |
3 | John | object4 |
4 | Smith | object1 |
5 | Smith | object2 |
6 | Smith | object3 |
7 | Smith | object4 |
8 | Jack | object1 |
9 | Jack | object2 |
10 | Jack | object3 |
11 | Jack | object4 |