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

# Spread

Spread a key-value pair across multiple columns. Missing values will be replaced with NA.

## How to Access This Feature

### From + (plus) Button

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

* Click "+" button and select "Spread (Pivot)".

### From Column Menu

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

* You can also select two columns for key/value first, and then select "Spread (Pivot)" from the column menu of one of the selected columns.

## Spread a Key/Value Column Pair across Multiple Columns

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

1. Select Columns to Spread

* Select Key/Value Columns from "Key Column"/"Value Column" dropdown.

2. Specify parameters in the "Parameters" section.

* Fill NA with - Value to fill missing values.
* Guess column data type - Select TRUE to automatically guess the most possible data type for the key column.
* Drop empty columns - The default is TRUE. Set FALSE to keep the levels that don’t appear in the data, filling in missing combinations with the text set with 'Fill NA with' field.
* Column Names Separator - The default is NULL. If NULL, the column names are values of the key column. Set separator text to make the column names "{key_column_name}{separator}{key_value}".

3. Click "Run".


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