I do as below:
data1 = pd.DataFrame({ \'b\' : [1, 1, 1], \'a\' : [2, 2, 2]}) data2 = pd.DataFrame({ \'b\' : [1, 1, 1], \'a\' : [2, 2, 2]}) frames = [data1, data2
Simplest way is firstly make the columns same order then concat:
df2=df2[df1.columns] df=pd.concat((df1,df2),axis=0)