首页 > 其他分享 >报错 Shape of passed values is (8, 51), indices imply (6, 51)

报错 Shape of passed values is (8, 51), indices imply (6, 51)

时间:2023-03-02 11:35:09浏览次数:33  
标签:index 51 Shape imply 报错 passed concat

在做concat操作的时候,出现了这样的错误:

Shape of passed values is (8, 51), indices imply (6, 51)

经过检查是因为数据前面使用过append,index是不一样的;在concat的时候是根据默认的index进行拼接的;因此需要进行reset_index()操作来进行index的更新匹配

保证双方index一致的是就可以进行横向拼接concat

标签:index,51,Shape,imply,报错,passed,concat
From: https://www.cnblogs.com/AKsnoopy/p/17171188.html

相关文章