Session Ready
Exercise

Generate scatter plot with missingness

In this exercise you'll create a scatter plot consisting of both missing and non-missing values. You will utilize the function fill_dummy_values() which you created in the previous exercise for filling in dummy values in the DataFrame diabetes_dummy.

For setting different colors to the missing and non-missing values, you can simply add the nullity, or the sum of null values of both respective columns that you are plotting calculated using the .isnull() method. The nullity returns a Series of True or False where:

  • True \(\rightarrow\) Either col1 or col2 or both values are missing.
  • False \(\rightarrow\) Neither of col1 and col2 values are missing.

The DataFrame diabetes and the function fill_dummy_values() have been loaded for your usage.

Instructions
100 XP
  • Fill dummy values in diabetes_dummy using fill_dummy_values().
  • Sum the nullity of 'BMI' and 'Skin_Fold'.
  • Create a scatter plot of 'Skin_Fold' vs. 'BMI'.