Question · Python course · Module 8: Data Science
Dropping a Column
How do you drop a column 'temp' from a DataFrame using the drop method?
Answer options
- df.delete(column='temp')
- df.drop('temp', axis=0)
- df.remove('temp')
- df.drop('temp', axis=1)
You can check the correct answer by solving this task in the CodeWorlds game.