I have a 1x100 1D array that looks like :
(A1,B1,C1,D1),(A2,B2,C2.D2),(A3,B3,C3,D3) ..... (A100,B100,C100,D100)
I want to convert this array into a 4x100 2D array that looks like:
A1, B1, C1, D1
A2, B2, C2, D2
A3, B3, C3, D3
A4, B4, C4, D4
....
A100, B100, C100, D100
I tried using Convert a 1D array to a 2D array in numpy to reshape the array, but that doesn't solve the problem of turning my grouped array elements into separate array elements.
EDIT
My dataset was created from a normal Pandas dataframe with 6 columns.
df = pd.pivot_table(concord, index = ['Col1','Col2','Col3', 'Col4'], columns
= 'Col5', values = 'Col6')
This produces an index comprised of 4 columns on a dataframe with as many columns as rows in Col5. I then produce my grouped array with.
df.index.values
Here is an example of what I am dealing with:
df = pd.DataFrame(np.random.randn(6,4),columns=list('ABCD'))
df = pd.pivot_table(df, index = ['A','B'], columns = 'C', values = 'D')
df.index.values