Reputation: 417
I'd like to merge dataframes df1 and df2, and preserve the row data in the order of original index value.
df3 is my desired output :
Upvotes: 0
Views: 308
Reputation: 150785
Use concat
:
pd.concat((df1,df2)).sort_index(kind='mergesort').reset_index(drop=True)
Upvotes: 1