【发布时间】:2017-02-22 09:57:40
【问题描述】:
我有一个 ASCII 数据集,它具有 ctrl A 字段分隔符和 \n 作为行分隔符。我希望将其读入 Python 并想知道如何处理它。特别是我希望能够将这些信息读入熊猫数据框。
我目前有;
import pandas as pd
input = pd.read_csv('000000_0', sep='^A')
然后我得到的错误是
_main__:1: ParserWarning: Falling back to the 'python' engine because the 'c' engine does
not support regex separators; you can avoid this warning by specifying engine='python'.
然后我也不知道我是如何指定行分隔符的。
有什么想法吗?
提前致谢!
【问题讨论】:
-
使用常规方法有没有问题?