# summarise-datatable

## Description

<mark style="color:purple;">`summarise-datatable`</mark> *adaptor summarises information about specified columns in a datatable.*

## Inputs

**`data`**\
Type: `datatable`\
Required: Yes\
The datatable to be summarised.

**`columns`**\
Type: `list`\
Required: No\
A list of columns to be summarised. If unspecified, all columns will be summarised.

## Outputs

**`summary`**\
Type: `datatable`\
A datatable containing summarised information about each column.

## Examples

### Example 1: Default behaviour.

#### Inputs:

`data`:

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

`columns`: *null(empty)*

#### Outputs:

`summary`:

<table><thead><tr><th>Column</th><th>Type</th><th width="185">Missing%(out of 6)</th><th width="153">Unique values</th><th>Mean</th></tr></thead><tbody><tr><td>id</td><td>number</td><td>0.0%(0)</td><td>6</td><td>3.5</td></tr><tr><td>code</td><td>string</td><td>0.0%(0)</td><td>5</td><td></td></tr><tr><td>name</td><td>string</td><td>0.0%(0)</td><td>4</td><td></td></tr></tbody></table>

-> Summarised information about the entire datatable.


---

# 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/summarise-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.
