It is necessary to round the number 4.78221659393e-07 . The number belongs to the class type 'numpy.float64'. round works as I understand it with strings, so it simply displays here that the type of this 4.78221659393e- How can you round or present the full view so that you can work further as a string?

Need to remove the degree. That it was not e-07 and 0.00....478221659393

  • round() works with numbers. For example: round(1.2345, 2) -> 1.23 - jfs
  • Related question: Fixed precision number - jfs

1 answer 1

if the question is in displaying a number in a string, then it is better not to convert it, but to display it in the correct format, like this:

 а = float(1.121e-05) s = '%.20f' %f >>> s >>> '0.00001121000000000000'