CBSE Class 12 Informatics Practices Question 13 of 101

Python Pandas — II — Question 9

Back to all questions
9
Question

Question 9

What is the difference between dropna() and fillna() ?

Answer

The dropna() method is used to drop all rows that contain NaN values from a DataFrame. On the other hand, the fillna() method is used to replace all NaN values in a Pandas object with the specified value.