Daily Challenge #29

Transposing Data

Given data-table data like below:

A,B,C,D,E,F
G,H,I,J,K,L
M,N,O,P,Q,R
S,T,U,V,W,X
Y,Z,a,b,c,d
e,f,g,h,i,j

transpose data so that columns would become rows like below:

A,G,M,S,Y,e
B,H,N,T,Z,f
C,I,O,U,a,g
D,J,P,V,b,h
E,K,Q,W,c,i
F,L,R,X,d,j

Hints:

  • List of list
  • File
8 Likes

Just FYI, this type of transposition (rotation), can come in handy for like crosswords when you want to generate random words vertically. For this situation, you can rotatate data-table, generate random words horizontally (like this), then rotate data-table back

3 Likes

Hello community,

I noticed that no solution was provide for this. So, below is solution. Notice how input is transposed. Iā€™m using a Label component. That component can be set to hidden (if needed):

5 Likes