append dataframe pandas

>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=list('AB'))
>>> df
   A  B
0  1  2
1  3  4
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=list('AB'))
>>> df.append(df2)
   A  B
0  1  2
1  3  4
0  5  6
1  7  8

Here is what the above code is Doing:
1. We create a DataFrame df with two columns A and B.
2. We create a DataFrame df2 with two columns A and B.
3. We append df2 to df.

The append() method returns a new DataFrame with the new rows added to the original DataFrame.

If you don’t specify a column, the new DataFrame will have a new column numbered 0.

You can also append a list of DataFrames to another DataFrame: