Issue
I have numpy array of size (6214,1), which looks like this:
I would like to create a column after each blank space, but whatever I try I am not successful. How could I reshape this array from 6214x1 -> 6214x6 ?
Solution
The original array contains strings. So all we have to do is to split them and convert to floats:
np.array([i.split() for i in a.flat], dtype=float) # a is the original array
Answered By - Vitalizzare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.