Answers for "convert series to numpy array"

1

series to numpy array

np_array = series.to_numpy()
Posted by: Guest on May-20-2021
-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 "convert series to numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language