[docs] floating point conversion error

Brian D'Urso dursolab at gmail.com
Fri Jul 6 21:57:23 CEST 2012

Converting from a string to a float (for example, after having read in data
from a file) encounter a "value error: invalid literal" error when given
'00E', which is part of '00E+00', the representation used by several
spreadsheet programs for 0 when a cell is set to scientific notation. This
renders all python programs unable to work with any data input from files
created by a program that adheres to this convention, most notably EXCEL
and Calc, without specific user intervention, either on the spreadsheet or
pythons sides. his should properly translate to 0.0 as a float when

Example code:

#expects data of this form (a CSV file):
        #,,Height Comparison (mm),,,Tilt Comparison (degrees),,,




dat =
    for x in dat:

#will fail here if any value is 00E+00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20120706/00bf6fa2/attachment.html>

More information about the docs mailing list