I am trying to do the partition of the list variable called test so that answer will look like the variable called goal. The test list is actually a list of long data. In this example I have a short version example according to the code below which also includes my attempts called ans1 and ans2 using method called Partition and ArrayShape:
Clear[ans];
goal={{{a,b,c},{d,e,f},{g,h,i},j},{{k,l,m},{n,o,p},{q,r,s},t}};
TableForm[goal]
And the output should be
a d g
b e h j
c f i
k n q
l o r t
m p s
My attempt is:
test={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t};
ans1=Partition[test,3,3,1,Nothing]
{{a,b,c},{d,e,f},{g,h,i},{j,k,l},{m,n,o},{p,q,r},{s,t}}
TableForm[ans1]
ans2=ArrayReshape[test,{3,3,3},1]
{{{a,b,c},{d,e,f},{g,h,i}},{{j,k,l},{m,n,o},{p,q,r}},{{s,t,1},{1,1,1},{1,1,1}}}
TableForm[ans2]