简体   繁体   English

为什么在读取 python 中的文件时出现“错误标记数据”?

[英]Why am i getting“Error Tokenizing Data” while reading a file in python?

Here is the code这是代码在此处输入图像描述

在此处输入图像描述

df = pd.read_csv("File path") df = pd.read_csv("文件路径")

you could also try;你也可以试试;

data = pd.read_csv('filename.csv', error_bad_lines=False)

Please note that this will cause the offending lines to be skipped.请注意,这将导致有问题的行被跳过。

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

相关问题 为什么在Python中读取csv文件时会得到字符串而不是字典? - Why am I getting a string instead of a dictionary while reading a csv file in Python? 为什么在读取数据并将数据拆分为Python列表后出现索引错误? - Why am I getting an index error after reading in data and splitting the data into a list in Python? 在jupyter中读取csv文件时出现错误 - i am getting error while reading the csv file in jupyter 用Python读取一个巨大的文件:为什么我会遇到分段错误? - Reading a huge file in Python: Why am I getting a Segmentation Fault? 打开文件时出错:错误标记数据 - There is a error while opening the file: Error tokenizing data 为什么在读取 .json 文件时会出现此错误? - why am i getting this error when reading a .json file? Python Pandas 对数据进行标记时出错 - Python Pandas Error while Tokenizing Data Python pandas 读取文件错误:ParserError:标记数据时出错。 C错误: - Python pandas reading file error: ParserError: Error tokenizing data. C error: 为什么在尝试通过python插入数据MongoDB时出现错误? - Why I am getting error while trying to insert data MongoDB via python? 为什么我在保存文件时收到 Errno 13 错误? - Why am I getting Errno 13 Error while saving the file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM