Answers for "convert 2d string array to float python"

0

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]
Posted by: Guest on July-07-2021

Code answers related to "convert 2d string array to float python"

Python Answers by Framework

Browse Popular Code Answers by Language