Dropping Columns from a Pandas DataFrame

Python

Drops the columns 'PromoID' and 'Order_Date' from the dataframe.

 1|  df.drop(labels=['PromoID','Order_Date'], axis=1, inplace=True)
Did you find this snippet useful?

Sign up for free to to add this to your code library