CBSE Class 12 Informatics Practices
Question 103 of 167
Python Pandas — I — Question 14
Back to all questionsThe statements to delete a column from a DataFrame is:
del <Df object>[<column name>]
OR
df.drop([<column name>], axis = 1).
For example, the statement to delete a column Population from a dataframe df is del df['Population] or df.drop('Population', axis = 1).