Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/299.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/Pandas中读取表时出错_Python_Pandas - Fatal编程技术网

在Python/Pandas中读取表时出错

在Python/Pandas中读取表时出错,python,pandas,Python,Pandas,我正在使用Python/Pandas,当我尝试: df=pd.read_表(“/test/”+文件,sep='\t') 我得到一个错误: '标记数据时出错。C错误:第6927行预期有24个字段,SAW26' 如何克服这个问题?试试这个:-) 还可以尝试:df=pd.read\u csv(文件名,sep=r'\t')。实际上,您在此处放置的是一个选项卡,而不是字符序列“\”+“t” data = pd.read_csv('file1.csv', error_bad_lines=False)

我正在使用Python/Pandas,当我尝试:

df=pd.read_表(“/test/”+文件,sep='\t')

我得到一个错误:

'标记数据时出错。C错误:第6927行预期有24个字段,SAW26'

如何克服这个问题?

试试这个:-)


还可以尝试:
df=pd.read\u csv(文件名,sep=r'\t')
。实际上,您在此处放置的是一个选项卡,而不是字符序列
“\”+“t”
data = pd.read_csv('file1.csv', error_bad_lines=False)