# convert-list-to-datatable

## Description

<mark style="color:purple;">`convert-list-to-datatable`</mark> *adaptor is used to create a one-column datatable from values in a list.*

## Inputs

**`list`**\
Type: `list`\
Required: Yes\
The list to be converted to a datatable.

**`column name`**\
Type: `text`\
Required: No\
The name of the new datatable column. If unspecified, defaults to `value`.

## Outputs

**`data`**\
Type: `datatable`\
A single-column datatable containing the list values.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`data`:

* Spring
* Summer
* Autumn
* Winter

`column name`: Season

#### Outputs:

`data`:

| Season |
| ------ |
| Spring |
| Summer |
| Autumn |
| Winter |

-> Converted list into a datatable with `Season` column.

## Use Cases

* Data tables provide a structured and tabular representation of data from a list
* Data tables are a common format for storing and analyzing data in tools like Excel, Python, R and [Microreact](https://microreact.org/)
* Convert a text list to a datatable to add additional columns and data elements using the [`add-column`](/data-flo/reference-guide/add-column.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/convert-list-to-datatable.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.
