简体   繁体   English

在python科学记数法问题中处理excel CSV

[英]Processing an excel CSV in python scientific notation issue

I am trying to read a CSV generated from a frequency counter into Python.我正在尝试将从频率计数器生成的 CSV 读取到 Python 中。 When opened in excel the rows have scientific notation:在 excel 中打开时,行有科学记数法:

1.00E+07 1.00E+07

How would I convert this to a float with the right number of decimal places?我如何将其转换为具有正确小数位数的浮点数?

A simple type conversion to float didn't work and returned到 float 的简单类型转换不起作用并返回

10000000.0 when I need to extract 10000000.0 当我需要提取

10000100.2326908 10000100.2326908

Any ideas?有任何想法吗?

@Talbarran @塔尔巴兰

You need to edit the CSV data to:您需要将 CSV 数据编辑为:

 CVS_data_edited = 10000100.2326908
 print('{0:.7f}'.format (CVS_data_edited),'Print 7 places after the decimal')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM