How to delete multiple columns from a Pandas DataFrame by column name in Python

Deleting multiple columns from a Pandas DataFrame gives a new DataFrame without the named columns.

Solution for How to delete multiple columns from a Pandas DataFrame by column name in Python : You can use pd.DataFrame.drop() to remove columns by their name from a DataFrame Call pd.DataFrame.drop(column_names, axis=1, inplace=True) with a list of column names as column_names to remove the columns from pd.DataFrame.


how-to-delete-multiple-columns-from-a-pandas-dataframe-by-column-name-in-python