Retrieve DataFrame of all but one specified column

dataframe, pandas, python

Solution

use `drop` method:

df.drop(column_name, axis=1)

Problem

Is there a way to select all but one column in a pandas DataFrame object? I've seen ways to delete a column, but I don't want to do that.

Original source

Related problems