Python: Convert string (in scientific notation) to float
The float
function can do this:
>>> float('1.31E+01')
13.1
or for a list:
>>> map(float, ['3.76E+00', '1.31E+01', '1.14E+01'])
[3.76, 13.1, 11.4]
The float
function can do this:
>>> float('1.31E+01')
13.1
or for a list:
>>> map(float, ['3.76E+00', '1.31E+01', '1.14E+01'])
[3.76, 13.1, 11.4]