This question was incredibly hard for me to summarize in the title, so I'm sorry if it is misleading.
I have an array of arrays formatted like so:
array = [ [1,2,3,4,5,6,7,8,9],
[2,3,4,5,6,7,8,9,1],
[3,4,5,6,7,8,9,1,2],
[1,2,3,4,5,6,7,8,9],
[2,3,4,5,6,7,8,9,1],
[3,4,5,6,7,8,9,1,2],
[1,2,3,4,5,6,7,8,9],
[2,3,4,5,6,7,8,9,1],
[3,4,5,6,7,8,9,1,2]]
As you can see it's essentially a table with the subarrays as the rows in the table.
I want to create a function that takes the main array and essentially rotates it 90degrees clockwise. So the new subarrays are the first index of each array, the second index of each array, 3rd index of each array etc... ( I want my new main array to contain arrays of each column in this data set).
Thank you!