In this article, we’ll see how to add a new row of values to an existing dataframe. This can be used when we want to insert a new entry in our data that we might have missed adding earlier. There are different methods to achieve this. Now let’s see with the help of examples how we can do this
We can add a single row using DataFrame.loc. We can add the row at the last in our dataframe. We can get the number of rows using len(DataFrame.index) for determining the position at which we need to add the new row.
Please Login to comment...