> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Missing

> Remove rows with missing data from a dataset using Any or All matching across selected columns.

## Description

With this function you can remove rows with missing data from a dataset.

***

## Application

Missing data can either be an empty field or entries like `NaN`. `NaN` values are typically the result of failed calculations (for example, division by zero, missing upstream values, ...). Empty values could be because of sensor failure during tests or data sheets not being filled consistently.

Empty strings in categorical columns are also considered to be missing values and can be removed with this function. If a categorical column contains `NaN` strings these would be considered as missing values as well.

***

## How to use

* Select the dataset to work on in the field **Data**.
* In the field **Columns** select all columns of the dataset in which to search for missing data. You can either select a single column or multiple columns.
* Select the **Method** how missing data should be handled across multiple columns.

<table>
  <tbody>
    <tr>
      <td><p><strong>Any</strong></p></td>

      <td>
        <p>Remove a row if any of the selected columns have a missing value. This is equivalent to a <code>OR</code> condition:</p>
        <p><code>if column A is empty OR column B is empty then remove the row.</code></p>
      </td>
    </tr>

    <tr>
      <td><p><strong>All</strong></p></td>

      <td>
        <p>Remove a row only if all selected columns have a missing value. This is equivalent to a <code>AND</code> condition:</p>
        <p><code>if column A is empty AND column B is empty then remove the row.</code></p>
      </td>
    </tr>
  </tbody>
</table>

* You can either overwrite the existing dataset or enable **Save output under different name** to save a copy of the dataset.
* Click **Apply** to run the step.
* When the step is finished it will show an info how many rows were removed from the dataset.

<img src="https://mintcdn.com/coreweave-dbfa0e8d/QRLrBgwZtalbZXz3/monolith-ai/_media/Remove-Missing-1.png?fit=max&auto=format&n=QRLrBgwZtalbZXz3&q=85&s=1da6a6772973c6593a30f11531924efa" alt="Remove Missing step settings with Data, Columns, and Method fields" width="640" height="400" data-path="monolith-ai/_media/Remove-Missing-1.png" />

***

## Examples

Consider the following example table:

| Row | A | B |
| --- | - | - |
| 1   | 1 | 4 |
| 2   |   | 2 |
| 3   | 3 |   |
| 4   |   |   |
| 5   | 5 | 5 |

* Selecting both **Columns** `A` and `B` and the **Method** `All` would only remove Row 4 in the example above.
* Selecting both **Columns** `A` and `B` and the **Method** `Any` would remove Rows 2, 3, and 4 in the example above.

***

## More on this step

You can use the function [Plot Missing Data](/monolith-ai/1814202063/Plot+Missing+Data) first to visually check your data for missing data.
