【发布时间】:2021-11-14 19:45:26
【问题描述】:
我有两个dataframe,如下:
Background Skin Body Face Head
value Beige Light Gray TribalNecklace Beard Bowl Cut
value Blue Normal BowTie Pink Blushing Durag Red.
和
Link
0 https://example.com
1 httpsl//example2.com
当使用以下代码连接两个时:
df5 = pd.concat([df1, linkdf], axis=1, ignore_index=True)
df5
给出一个错误:
ValueError: 传递值的形状为 (6, 6),索引表示 (4, 6)
如何加入两个dataframe 而不会出现该错误?感谢您提前提供帮助。
【问题讨论】:
-
value的第一列是什么?索引? -
它的索引导致我从列更改为行