Hi All,
I never had a dataset like this:
ID Name Group1 Group1_ID1 Group1_D2 Group2 Group2_ID1 Group2_D2 Group3 Group3_ID1 Group3_D2
101 Mike English Eng2 Eng1 Biology Bio1
102 Julia English Eng1 Eng2 Biology Bio1 Bio2 Chemistry Che1 Che2
103 Luc English Eng3 Eng1 Biology Bio1 Bio2
I always worked with dataset like the following. Can someone tell me the code how to convert the above dataset like below. My original dataset has 35 groups, so I need a code that is efficient.
ID English Biology Chemistry
101 Eng2 Bio1
101 Eng1 Che2
102 Eng1 Bio1
102 Eng2 Bio2
102 Che1
102 Che2
103 Eng3 Bio1
103 Eng1 Bio2
Thank you.
... View more