Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to convert pandas series to 2d numpy array

a = np.array(s.values.tolist())
print (a)
[[ 0.  0.]
 [ 0.  0.]
 [ 0.  0.]
 [ 0.  0.]
 [ 0.  0.]]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #pandas #series #numpy #array
ADD COMMENT
Topic
Name
4+5 =