我在.dfx文件中有一些数据,我试图将它作为带熊猫的csv读取。但它有一些熊猫不能读的特殊字符。它们也是分隔符。 I attached one line from it数据读取 - csv
当我打印文件时,“DC4”被删除。 SI被正确读取为空格。我尝试了一些编码(utf-8,latin1等),但没有成功。 I attached the printed first line as well. I marked the place where the characters should be.
我的代码很简单:
import pandas
file_log = pandas.read_csv("file_log.DFX", header=None)
print(file_log)
我希望我是清楚的,有人有一个想法。 在此先感谢!
编辑:
输入。 LINK:drive.google.com/open?id=0BxMDhep-LHOIVGcybmsya2JVM28
预期输出:
88.4373 0 12.07.2014/17:05:22 38.0366 38.5179 1.3448 31.9839
30.0070 0 12.07.2014/17:14:27 38.0084 38.5091 0.0056 0.0033
你能提供一个示例输入(不是图像)和期望的输出吗? –
--------------------------------- – koger23
我加了你需要的东西,反正我也解决不了,如果我只是评论它的特殊字符。 – koger23