> For the complete documentation index, see [llms.txt](https://cgps.gitbook.io/data-flo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cgps.gitbook.io/data-flo/reference-guide/replace-blank-values.md).

# replace-blank-values

## Description

<mark style="color:purple;">`replace-blank-values`</mark> *adaptor replaces blank values in a datatable column.*

This adaptor only replaces blank values, to replace existing values in a datatable column, use the  [<mark style="color:purple;">`replace-values-in-columns`</mark>](/data-flo/reference-guide/replace-values-in-columns.md) adaptor. This adaptor may be used for a single column, or replacing blank values across multiple columns.

## Inputs

**`data`**\
Type: `datatable`\
Required: Yes\
The datatable containing blank values.

**`columns`**\
Type: `list`\
Required: Yes\
The names of the columns in `data` containing blank values.

**`new value`**\
Type: `text`\
Required: Yes\
A value to replace blank values.

## Outputs

**`data`**\
Type: `datatable`\
A datatable with the blank values replaced.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`data:`

| id | code | name           |
| -- | ---- | -------------- |
| 1  | GB   | United Kingdom |
| 2  | TR   | Turkey         |
| 3  | US   |                |
| 4  | IND  | India          |
| 5  | IND  | India          |
| 6  | us   |                |

`columns:`

1. name

`new value:` United States

#### Outputs:

`data`:

| id | country code | country name   |
| -- | ------------ | -------------- |
| 1  | GB           | United Kingdom |
| 2  | TR           | Turkey         |
| 3  | US           | United States  |
| 4  | IND          | India          |
| 5  | IND          | India          |
| 6  | us           | United States  |

-> Replaced the blank values with `United States` in the datatable.

### Example 2: Replace blank values in multiple columns.

#### Inputs:

`data:`

| id | code | name           |
| -- | ---- | -------------- |
| 1  | GB   | United Kingdom |
| 2  |      | Turkey         |
| 3  | US   |                |
| 4  | IND  | India          |
| 5  |      | India          |
| 6  | us   |                |

`columns:`

1. code, name

`new value:` Missing

#### Outputs:

`data`:

| id | country code | country name   |
| -- | ------------ | -------------- |
| 1  | GB           | United Kingdom |
| 2  | Missing      | Turkey         |
| 3  | US           | Missing        |
| 4  | IND          | India          |
| 5  | Missing      | India          |
| 6  | us           | Missing        |

-> Replaced the blank values in the code and name columns with `Missing` in the datatable.

## Use Cases

* Standardise values for missing information.
* Filling in a column after joining datatables.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/replace-blank-values.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
