Answers for "how to convert data frame to matrix"

R
4

data frame to matrix r

data.matrix(frame, rownames.force = NA)
Posted by: Guest on September-15-2020
-1

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.]]
Posted by: Guest on July-11-2020

Code answers related to "how to convert data frame to matrix"

Browse Popular Code Answers by Language