CBSE Class 12 Informatics Practices Question 75 of 101

Python Pandas — II — Question 17

Back to all questions
17
Question

Question 17

Why is missing data filled in DataFrame with some value ?

Answer

The dropna() method in pandas can be used to remove rows or columns with missing values from a DataFrame. However, this can also lead to a loss of non-null data, which may not be desirable for data analysis. To avoid losing non-null data, we can use the fillna() method to fill missing values with a specified value. This can help to ensure that the dataset is complete and can be used for data analysis.