Answers for "np array of strings to int"

1

convert all values in array into float

import numpy as np
x = np.array(['1.1', '2.2', '3.3'])
y = x.astype(np.float)
Posted by: Guest on March-06-2020
1

python ndarray string array into int

y = y.astype(np.uint8)
Posted by: Guest on April-04-2020

Code answers related to "np array of strings to int"

Python Answers by Framework

Browse Popular Code Answers by Language