Taking the following example:
>>> df1 = pd.DataFrame({\"x\":[1, 2, 3, 4, 5],
\"y\":[3, 4, 5, 6, 7]},
ind
Interpret axis=0 to apply the algorithm down each column, or to the row labels (the index).. A more detailed schema here.
If you apply that general interpretation to your case, the algorithm here is concat
. Thus for axis=0, it means:
for each column, take all the rows down (across all the dataframes for concat
) , and do contact them when they are in common (because you selected join=inner
).
So the meaning would be to take all columns x
and concat them down the rows which would stack each chunk of rows one after another. However, here x
is not present everywhere, so it is not kept for the final result. The same applies for z
. For y
the result is kept as y
is in all dataframes. This is the result you have.