Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert 2d string array to float python

import numpy as np

a = ['0.1234', '12345.6789']
a = a.astype(np.float)
print(a)
# Output : [0.1234, 12345.6789]
 
PREVIOUS NEXT
Tagged: #convert #string #array #float #python
ADD COMMENT
Topic
Name
9+6 =