pandas dataframe remove column from dataframe code example
Example 1: how to delete a column from a dataframe in python
del df['column']
Example 2: is coumn exist then delete in datafrmae
if 'A' in df.columns:
del df['A']
del df['column']
if 'A' in df.columns:
del df['A']