Explore Courses Blog Tutorials Interview Questions
0 votes
in Data Science by (17.6k points)

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.

1 Answer

0 votes
by (41.4k points)

Use drop method:

df.drop(column_name, axis=1)

Related questions

Browse Categories