Reputation: 691
I have a data frame like this. [from csv file]
l1 p1 p2 p3 ... p10
0 ↑ ←---- rows ----→
1 | ←---- rows ----→
2 c ←---- rows ----→
3 o ←---- rows ----→
. l ←---- rows ----→
. | ←---- rows ----→
9 ↓ ←---- rows ----→
I want to convert l1 column into numpy array like this
[ ←, -, c, o, l, -, →] size : 10
and all the remaining columns into another numpy array like this\
[[ ← - r o w s - →],
[ ← - r o w s - →],
[ ← - r o w s - →]] size: (10, 10)
Also
columns in the data frame are images so how can I further divide my data frame like this
l1 p1 p2 .... p784
0 ↑ ←---- rows ----→
1 | ←---- rows ----→
2 c ←---- rows ----→
3 o ←---- rows ----→
. l ←---- rows ----→
. | ←---- rows ----→
27455 ↓ ←---- rows ----→
After getting the rows array on this data frame
I will have numpy array of size(27455, 784)
How to further split this array into size(27455, 28, 28)
how to do this !!
any other way will also be appreciated !!
Upvotes: 1
Views: 698