how to remove column from dataframe code example
Example 1: drop columns pandas
df.drop(columns=['B', 'C'])
Example 2: remove column from dataframe
df.drop('column_name', axis=1, inplace=True)
Example 3: drop a column in pandas
note: df is your dataframe
df = df.drop('coloum_name',axis=1)
Example 4: drop column dataframe
df.drop(columns=['Unnamed: 0'])