Exercise

Listwise deletion

The simplest way to deal with missing values in your dataset when they are occurring entirely at random is to remove those rows, also called 'listwise deletion'.

Depending on the use case, you will sometimes want to remove all missing values in your data while other times you may want to only remove a particular column if too many values are missing in that column.

Instructions 1/4

undefined XP
  • 1

    Print the number of rows and columns in so_survey_df.

  • 2

    Drop all rows with missing values in so_survey_df.

  • 3

    Drop all columns with missing values in so_survey_df.

  • 4

    Drop all rows in so_survey_df where 'Gender' is missing.