df = pd.concat([new_row, df]).reset_index(drop = True) df.head(5) Output:Data Frame before Adding Row-Data Frame after Adding Row-For more examples refer to Add a row at top in pandas DataFrame Row Deletion: In Order to delete a row in Pandas DataFrame, we can use the drop() method. Rows is deleted by dropping Rows by index label.
4.7. Filter Rows or Columns #. 4.7.1. Pandas.Series.isin: Filter Rows Only If Column Contains Values From Another List #. When working with a pandas Dataframe, if you want to select the values that are in another list, the fastest way is to use isin. In the example below, 2 is filtered out because 3 is not in the list. . 219 395 130 324 102 156 381 95 19