热线电话:13121318867

登录
2020-09-14 阅读量: 865
Python导入数据报错:ValueError: could not broadcast input aray from shape (8) 1nto shape (9)

问:

Python导入数据报错:ValueError: could not broadcast input aray from shape (8) 1nto shape (9)

image.png

image.png


答:

根据报错提示是由于导入的数据长度为8,而指定的index的长度为9,无法成功导入数据,排查代码可发现字典data中键名为‘规格’的值中少了个逗号,

从9个元素变成8个元素,因此将逗号补全即可成功导入数据。

image.png


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

发表评论

暂无数据
推荐帖子