three column df to matrix python code example
Example 1: data frame to matrix r
data.matrix(frame, rownames.force = NA)
Example 2: 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.]]