![](/img/trans.png)
[英]How can I join two dataframes in pandas that have different no of rows and different columns?
[英]How can I 'row bind' two pandas dataframes with different columns?
兩個數據框的列數相同,但列名不同。
如何垂直綁定兩個數據框?
你可以試試
df2.columns=df1.columns
pd.concat([df1,df2], ignore_index=True)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.