There may be situations where we need to insert a new data that we might have missed earlier. There are various ways to add a new row to our existing Pandas DataFrame. In this article we will see how to achieve this with the help of examples.

Example 1:

We can add a single row using DataFrame.loc. A row is added at the last in the DataFrame and by using len(DataFrame.index)to get the number of rows for determining the position at which we need to add the new row.

** …**

#technology

Adding a new row to an existing Pandas DataFrame
1.15 GEEK