[Baypiggies] scientific notation: string to int
Bryce Verdier
bryceverdier at gmail.com
Thu Dec 9 22:18:20 CET 2010
I knew it was to easy to be true. Help?!?!
Traceback (most recent call last):
File "./space_report.py", line 58, in <module>
file1_class_clients.append(client(x,v))
File "./space_report.py", line 10, in __init__
self.size = float(size)
ValueError: could not convert string to float: Commercial Max Space Used
This is in python 3.1.2 if that matters.
Bryce
On 12/08/2010 01:38 PM, Andrew Dalke wrote:
> On Dec 8, 2010, at 10:24 PM, Bryce Verdier wrote:
>> b1021384-6633-4756-b3e1-c36d34c1dfd2, clientname_001,Thu Dec 2 00:00:00 UTC 2010,2.96116E+11,0,0, Thu Dec 2 00:00:00 UTC 2010,577078067
>> 20,15228831373,80966857300,
>>
>> so I'm curious if there is a way to turn the string of scientific notion into the actual numerical value?
>
>>>> float("2.96116E+11")
> 296116000000.0
> Andrew
> dalke at dalkescientific.com
>
>
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> http://mail.python.org/mailman/listinfo/baypiggies
More information about the Baypiggies
mailing list