0
I have two pandas Dataframes that I would like to match into one. They have the same number of columns in the same order, but have headers with different names. Is there any approach to efficiently combine these dataframes?
df1
index Data1 Nome1
0 1-1-18 1
1 2-1-18 2
df2
index Data2 Nome2
0 3-1-18 3
1 4-1-18 4
df_concat
index Data Nome
0 1-1-18 1
1 2-1-18 2
2 3-1-18 3
3 4-1-18 4
The only approach I’ve found so far was renaming the headers and then using the Concat method:
pd.concat([df1, df2, axis = 0, ignore_index = True)
However, I would like to know if there is a more general approach.