> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exploratory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Gather (Unpivot)

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

## How to Access This Feature

## From + (plus) Button

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/command-gather-df-menu.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=2aed118df231b5a4a9dee6dec8f2f546)

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

### From Column Menu

![](https://mintcdn.com/exploratory-inc/TqmeqBdjk6dsTTLj/en/wrangling/images/command-gather-column-menu.png?fit=max\&auto=format\&n=TqmeqBdjk6dsTTLj\&q=85\&s=e30723fc284b16bbccfd8d7bf2a1bc03)

* 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

![](https://mintcdn.com/exploratory-inc/mfFUqJbgNW8Lp3uy/en/wrangling/images/gather.png?fit=max\&auto=format\&n=mfFUqJbgNW8Lp3uy\&q=85\&s=363c7d1fb2363bb06b99d736a93ccac2)

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.

2. Specify names of Key/Value Columns to create by typing the names in "Key Column" and "Value Column" text fields.
3. 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.

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.