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 ?
CodePudding user response:
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
CodePudding user response:
hope you get the answer from this working