Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 如何在pandas中打开大型csv文件_Python 3.x_Pandas_Csv - Fatal编程技术网

Python 3.x 如何在pandas中打开大型csv文件

Python 3.x 如何在pandas中打开大型csv文件,python-3.x,pandas,csv,Python 3.x,Pandas,Csv,我从社交媒体平台收集数据并将其存储在一个csv文件中,在这个文件中我有大约180万条评论,我正在尝试使用pandas打开它。我在打开时使用了python引擎,文件大小为122MB,它的代码注释与emojis混合在一起,但我得到了一个错误 ParserError: NULL byte detected. This byte cannot be processed in Python's native csv library at the moment, so please pass in engi

我从社交媒体平台收集数据并将其存储在一个csv文件中,在这个文件中我有大约180万条评论,我正在尝试使用pandas打开它。我在打开时使用了python引擎,文件大小为122MB,它的代码注释与emojis混合在一起,但我得到了一个错误

ParserError: NULL byte detected. This byte cannot be processed in Python's native csv library at the moment, so please pass in engine='c' instead
因此,我尝试使用engine='c',但现在出现了另一个错误

ParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file.

这回答了你的问题吗?@Dishin H Goyani是的,它用于读取文件,但当我尝试将其转换为列表时,我得到了错误AttributeError:“Series”对象没有属性“tolist”,我尝试了df=dd.read_csv(),df[“column”]。tolist()您是否遇到了相同的错误?我现在无法访问内容,我能够将文件读取到数据框中数据框中是否有任何内容或显示为null?