How to suppress scientific notation from a float value in python. Here I tried the following code but it's not working
r_val[v].append('%.2f' % val.get("closing_balance"))
Thanks in advance
How to suppress scientific notation from a float value in python. Here I tried the following code but it's not working
r_val[v].append('%.2f' % val.get("closing_balance"))
Thanks in advance
Using format(x, '.#f')
consider this snippet:
x = 0.000000235
print(x)
2.35e-07
print (format(x, '.9f'))
0.000000235
Or, to go closer to your question:
y = -1.06267582739e-11 # note I changed '+' to '-' since '+' is is just represented as a regular float
print(y)
-1.06267582739e-11
print(format(y,'.22f'))
-0.0000000000106267582739