drop df python code example Example 1: drop columns pandas df.drop(columns=['B', 'C']) Example 2: drop a column from dataframe df = df.drop('column_name', 1)