# list-datatable-columns

## Description

<mark style="color:purple;">`list-datatable-columns`</mark> *adaptor creates a list of datatable column names.*

## Inputs

**`data`**\
Type: `datatable`\
Required: Yes\
The datatable containing columns to be listed.

## Outputs

**`column names`**\
Type: `list`\
The list of column names.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`data:`

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

#### Outputs:

`column names`:

1. id
2. code
3. name

-> Created a list of datatable column names.

## Use Cases

* Comparing column names between two datasets by getting a list of columns from each dataset.
* Outputting a list of columns to facilitate identifying columns to remove from the datatable using the [<mark style="color:purple;">`remove-columns`</mark>](/data-flo/reference-guide/remove-columns.md) adaptor.


---

# Agent Instructions: 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:

```
GET https://cgps.gitbook.io/data-flo/reference-guide/list-datatable-columns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
