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

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

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

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

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

posted @ 2023-03-02 11:20  土星狗蛋  阅读(343)  评论(0)    收藏  举报