How to delete a column from a Python Pandas DataFrame?

To delete a column from a Python Pandas DataFrame, we call the drop method.

For instance, we write

df = df.drop('column_name', 1)

to call df.drop to drop the column_name column and 1 means this is the only column we drop.