First data frame is:
| a | b | c |
|---|---|---|
| 1 | 2 | 3 |
Second data frame is:
| a1 | b | c1 |
|---|---|---|
| 4 | 5 | 6 |
What I expect is:
| a | b | c |
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
Just move all values from df2 in df1, the column names may be different.
>Solution :
One option is to concatenate the underlying numpy arrays and build a DataFrame:
out = pd.DataFrame(np.r_[df1.to_numpy(), df2.to_numpy()], columns=df1.columns)
Output:
a b c
0 1 2 3
1 4 5 6