How to drop a list of rows from a Pandas DataFrame by index in Python

Dropping a list of rows from a Pandas DataFrame by index removes the rows with those indices from the DataFrame.

Solution for How to drop a list of rows from a Pandas DataFrame by index in Python : You can use pandas.DataFrame.drop() to drop a list of rows Call pandas.DataFrame.drop(index, inplace=False) with index as DataFrame.index[list] with list as a list of row indices to drop the list of rows in DataFrame. To drop the list of rows in-place set inplace to True.


how-to-drop-a-list-of-rows-from-a-pandas-dataframe-by-index-in-python