1. Learn
  2. /
  3. Courses
  4. /
  5. Data Manipulation with pandas

Connected

Exercise

Removing missing values

Now that you know there are some missing values in your DataFrame, you have a few options to deal with them. One way is to remove them from the dataset completely. In this exercise, you'll remove missing values by removing all rows that contain missing values.

pandas has been imported as pd and avocados_2016 is available.

Instructions

100 XP
  • Remove the rows of avocados_2016 that contain missing values and store the remaining rows in avocados_complete.
  • Verify that all missing values have been removed from avocados_complete. Calculate each column that has NAs and print.