Interview Kickstart has enabled over 21000 engineers to uplevel.
# Introduction to Pandas Dataframe Append The Pandas dataframe append() function is used to merge the rows of two dataframes. This function allows the user to add one or more rows to the existing dataframe. The append() function returns a new dataframe with the newly added row(s) to the original dataframe. This function is helpful in scenarios where data from different sources need to be combined into a single dataframe. The append() function is also useful for adding columns to an existing dataframe. In this article, we will discuss the usage of the append() function in Pandas and how it can be used to append rows and columns to an existing dataframe. We will also look at examples to understand how the append() function works.
Attend our webinar on
"How to nail your next tech interview" and learn
**Algorithm** 1. Create a new empty dataframe with the desired columns 2. Create a for loop to iterate through the list of dataframes 3. Inside the for loop, use the pandas append method to add each dataframe to the new dataframe 4. Once the for loop is complete, the new dataframe will contain all of the data from the list of dataframes **Sample Code** ```python # Create a new empty dataframe df_new = pd.DataFrame(columns=['A','B','C']) # Iterate through list of dataframes for df in list_of_df: # Append the dataframe to the new dataframe df_new = df_new.append(df) ```