python push to dataframe pandas

df = df.append({'a':1, 'b':2}, ignore_index=True)

Here is what the above code is Doing:
1. We create a new empty dataframe.
2. We append a row to the dataframe.
3. We ignore the index.

The ignore_index parameter is important here. If we don’t ignore the index, the index will be overwritten.

Let’s see what happens if we don’t ignore the index.