您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决ValueError: Number of passed names did not match number of header fields in the file

一个处女座的程序猿 发布时间:2020-09-09 21:17:05 ,浏览量:0

成功解决ValueError: Number of passed names did not match number of header fields in the file

 

 

 

目录

解决问题

解决思路

解决方法

 

 

 

解决问题

ValueError: Number of passed names did not match number of header fields in the file

 

 

解决思路

值错误:传递的名称数量与文件中头字段的数量不匹配!

 

 

解决方法

使用names参数时,类似重命名。切记,要与原数据全部匹配:即不能多也不能少,多或者少都会抛出ValueError错误,所以,只需要补全所有的列标题名即可!

names=['roomtype','height','direction','decorate','garden','district','total_price_Num','area_Num'],

改为

names=['','roomtype','height','direction','decorate','garden','district','total_price_Num','area_Num'],

 

 

 

 

 

 

 

 

 

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0793s