The float:
fl = 0.000005
casts to String as str(fl)=='5e-06'. however, I want it to cast as str(fl)='0.000005' for exporting to CSV purposes.
String
str(fl)=='5e-06'
str(fl)='0.000005'
CSV
How do I achieve this?
You can just use the standard string formatting option stating the precision you want
>>> fl = 0.000005 >>> print '%.6f' % fl 0.000005
2.1m questions
2.1m answers
60 comments
57.0k users