[Baypiggies] scientific notation: string to int
eric.edens at gmail.com
Wed Dec 8 22:42:00 CET 2010
Any ideas for improvement?
'''@param baz - string representation of
exp notation, ie "3.2E4" or "3.2E-4"
base, exp = map(float,baz.split('E'))
>>> foo ('2.96116E+11')
>>> foo ('2.96116E-11')
>>> foo ('3.2E4')
On Wed, Dec 8, 2010 at 1:24 PM, Bryce Verdier <bryceverdier at gmail.com>wrote:
> So I've been given a project for work, a large CSV file with many many
> numbers and such to parse through. The lines that look like this:
> 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
> so I'm curious if there is a way to turn the string of scientific notion
> into the actual numerical value?
> All ideas are welcomed and thank in advance,
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Baypiggies