# Gather

Takes multiple columns and collapses into key-value pairs, duplicating all other columns as needed.

## How to Access This Feature

## From + (plus) Button

![](/files/-M4oNAcGFu7GsBeLhKxy)

* Click "+" button and select "Gather".

### From Column Menu

![](/files/-M4oNAcRSHuaLfyrFQfP)

* You can also select columns to gather first, and then select "Gather (Unpivot)" from the column menu of one of the selected columns.

## Gather (Unpivot) Columns into Key/Value Column Pair

![](/files/-M4oNAcWswvjTjufCIRM)

1. Select Columns to Gather

* Select "Include" or "Exclude" depending on whether you are specifying the columns to gather or the columns not to gather.
* Select the rule for specifying the columns.
* Fill the rest of parameters in "Select Column" section.

1. Specify names of Key/Value Columns to create by typing the names in "Key Column" and "Value Column" text fields.
2. Specify parameters in the "Parameters" section.

* Remove NA - Select TRUE to remove NA rows from the result
* Guess column data type - Select TRUE to automatically guess the most possible data type for the key column.

1. Click "Run" to gather columns into key/value column pair.


---

# 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.exploratory.io/data-wrangling/gather.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.
