# Transpose a Table

### Overview

This procedure transposes a given table. It flips the table's rows to columns and the columns to rows. This may be useful when you want to view or work with your data from a different angle. For example, turning a list of dates in a column into headers across the top, or switching the focus from categories to individual entries.

### Input Concepts

| Concept            | Type  | Description                                           | Default    | Required |
| ------------------ | ----- | ----------------------------------------------------- | ---------- | -------- |
| `table`            | table | The table to transpose                                | No default | Yes      |
| `index column`     | text  | The name of the index column for the transposed table | No default | No       |
| `new column names` | text  | New names for the transposed columns                  | No default | No       |

### Output Concepts

| Concept | Description                          |
| ------- | ------------------------------------ |
| `table` | The updated table after transposing. |

### Examples

#### 1. Transpose an Table

{% tabs %}
{% tab title="Automation" %}

```
create an integer table
transpose the table
```

{% endtab %}

{% tab title="Results" %}

| 0             | 1   | index |
| ------------- | --- | ----- |
| 100           | 200 | Amt   |
| 10            | 5   | Min   |
| 300           | 500 | Max   |
| {% endtab %}  |     |       |
| {% endtabs %} |     |       |

### 2. Transpose a Table Using Optional Arguments

{% tabs %}
{% tab title="Automation" %}

```
create a sample table
transpose the table where
    the index column is "Name"
    the new column names are "A1", "A2", "A3"
```

{% endtab %}

{% tab title="Results" %}

| A1                 | A2               | A3            |
| ------------------ | ---------------- | ------------- |
| + 1 (415) 691 9426 | 123 east street  | San Francisco |
| + 1 (415) 691 1234 | 321 west street  | San Jose      |
| + 1 (415) 691 4595 | 213 north street | San Francisco |
| {% endtab %}       |                  |               |
| {% endtabs %}      |                  |               |


---

# 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://docs.kognitos.com/legacy/legacy-experience/automation-areas/tables-v2/query-a-table/transpose-a-table.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.
