如何在pandas中组合两个数据列?

时间:2017-10-29 19:21:51

标签: pandas

我有两张桌子,如下图所示。我想将两个表合并为1.我尝试合并,连接,加入熊猫但是它给出了一个高度为20的新表,我希望在新的组合表中高度为10。怎么做这个熊猫数据帧? enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

axis=1需要concat

df = pd.concat([df1, df2], axis=1)