> For the complete documentation index, see [llms.txt](https://docs.cascade.io/cascade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cascade.io/cascade/tools/transform/unpivot.md).

# Unpivot

Unpivot takes many columns in a table and lines them up into a single column called "value". A new column will be created called "variable", which holds the value of the column header in the original table.

For example, in a table with multiple value columns:

![](https://files.readme.io/829244e-New_Workbook.png)

Unpivot will create a narrower table with variable and value pairs:

![](https://files.readme.io/0f334eb-New_Workbook.png)

### Options

| Selection                           | Description                                                                                                 |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **ID Columns**                      | The columns which should *not* be broken out into rows. Each unpivot tool needs at least one **ID column**. |
| **Variable Column Name** (optional) | The default name for the variable column is "variable". Fill this in to rename that column.                 |


---

# 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://docs.cascade.io/cascade/tools/transform/unpivot.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.
