Filter missing data with Code Assist

Probably the most common filtering operation is to remove missing values.

For the examples below we’ll be using the Palmer Penguins data.

  1. Launch the Transformation widget. Select the data frame that you want to filter.

  2. Hover over the kebab icon to the right of any of the NaN values in the sex column. Then click on the Filter values like this popup button.

    Hover then select Filter values like this
  3. A dialog appears with fields to choose a column, an operator and a value. The value is set to NaN by default. Choose the != operator.

    Configure the filter
  4. The preview is updated. Press the RUN button.

  5. The code is inserted into the notebook and run immediately. Records with missing values in the sex column are removed.

Output from when code is inserted and executed