标签: python python-3.x
我尝试使用以下代码将excel文件读入Ijupyer笔记本:
将pandas导入为pd 导入numpy为np 将matplotlib导入为plt
df=pd.read_csv('Data_2.xlsx')
然而,它给了我结果: ParserError: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2
ParserError: Error tokenizing data. C error: Expected 1 fields in line 4, saw 2
The excel file looks as such
答案 0 :(得分:0)
read_excel()解决了这个问题:
df=pd.read_excel('Data_2.xlsx')