0

There a data.txt:

1571040600: 1.9673150889e+03 2.3919535556e+03
1571040900: 1.2449858889e+03 1.5374418444e+03
1571041200: 1.0841996556e+03 1.3565952667e+03
1571041500: 9.5094722222e+02 1.1993240000e+03
1571041800: 1.4359398000e+03 1.7860326778e+03
1571042100: 1.0457769889e+03 1.3188025444e+03
1571042400: 8.2156277372e+02 1.0441558276e+03
1571042700: 6.0619294014e+02 7.7817031248e+02
...

I am very understand the 1.9673150889e+03 means 1.967315088 * 10^3, but is there a builtin method to convert this type number to a float number in general?

1.9673150889e+03 -> 1967.3150889
user7693832
  • 6,119
  • 19
  • 63
  • 114
  • Do you mean to **print** it in the desired format? There is no conversion between float in scientific notation and in "normal float number", it's just a formatting difference – GPhilo Oct 15 '19 at 08:23
  • From that one, answer would be `f'{a:.20f}'` where `a` is your number. – Corsaka Oct 15 '19 at 08:26
  • From what I understand he wants to convert the string '1.9673150889e+03' to float. In Python you can do this: my_float = float('1.9673150889e+03') – Jakub Šolín Oct 15 '19 at 08:38

0 Answers0