how to append to an empty dataframe pandas

df = df.append()

Here is what the above code is Doing:
1. We’re creating a new dataframe called df_new.
2. We’re appending the df_old dataframe to the df_new dataframe.
3. We’re printing out the df_new dataframe.

As you can see, the df_new dataframe now contains all the rows from the df_old dataframe.

Now, let’s say we want to append a new row to the df_new dataframe. We can do this by using the .loc[] method.