I have a data frame with the following structure. I need to bring all the values in columns code1,code2,code3into different rows under same name. Similarly for textcolumns.
Name Code1 text1 code2 text2 code3 text3
Alexa 362 Eng 639 scien 563 maths
john 23 cri 36 ball 03 value
What I would like is for it to look like
Name Code text
Alexa 362 Eng
Alexa 639 scien
Alexa 563 maths
john 23 cri
john 36 ball
john 03 value