2020-03-12
阅读量:
972
python:concat和append
concat()默认情况下是纵向连接两个DataFrame:
result = pd.concat([df1, df2], ignore_index=True) # 设置了ignore_index=True之后, 合并之后的DataFrame对index重新进行了排序。append()的默认操作效果跟concat()相同, 都是实现两个DataFrame的纵向连接。
result = df1.append(df2, ignore_index=True)
33.7175
6
4
关注作者
收藏
评论(0)
发表评论
暂无数据
推荐帖子
0条评论
0条评论
3条评论

