热线电话:13121318867

登录
2021-05-31 阅读量: 489
pandas读入数据文件时报以下错误提醒OSEror: Initializing from file failed

问:

pandas读入数据文件时报以下错误提醒,该怎么解决?




答:

在函数pd.read_csv内添加参数engine='python'即可,这是因为调用pandas的read_csv()方法时,默认使用C engine作为parser engine,而当文件名中含有中文的时候,用C engine在部分情况下就会出错,通过指定engine为Python就可以了



34.2857
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子