CBSE Class 12 Informatics Practices Question 102 of 167

Python Pandas — I — Question 13

Back to all questions
13
Question

Question 13

Write statement(s) to delete a row from a DataFrame.

Answer

The statement to delete a row from a DataFrame is:

<DF>.drop(index).

For example, the statement to delete the second row from a dataframe df is df.drop(1).