I have two dataframes df1 and df2. Here is a toy example so show my question. df1
looks like
col1 col2
1 2
0 7
df2
looks like
col1 col3
9 2
5 3
I would like to do pd.concat([df1,df2])
but in such a way that the result is:
col1 col2 col3
1 2 NaN
0 7 Nan
9 NaN 2
5 NaN 3
Is there a way to do this?