I'm trying to convert a df that has the data divided every 3 columns into just three. An example is from this:
C1 C2 C3 C4 C5 C6 C7 C8 C9
1 6 9 A D G 1A 6A 9A
2 7 10 B E H 2A 7A 10A
3 8 11 C F I 3A 8A 11A
To this:
C1 C2 C3
1 6 9
2 7 10
3 8 11
C4 C5 C6
A D G
B E H
C F I
C7 C8 C9
1A 6A 9A
2A 7A 10A
3A 8A 11A
C1 C1 C1
,C2 C2 C2
,C3 C3 C3
into actual rows of strings, mixed in with the data; we put them in a separate new column called e.g.variable
. – smci Oct 29 '20 at 21:46