---
title: Unfold column
description: Transform categorical values into separate binary indicator columns.
category: Data Transforms
tags: [unfold, one-hot encoding, binary, pivot, transform]
---

# Unfold column

## Description

The **Unfold Column** activity converts the unique values of a selected categorical column into separate binary columns (also known as one-hot encoding).

Each resulting column corresponds to one unique value in the original column. A value of `1` is placed in the column if the row matches that category, and `0` otherwise. This is especially useful for preparing data for machine learning, reporting, or advanced filtering.

> **Use case**:  
> When preparing data for classification models or dashboard filtering, you can unfold a "Category" or "Status" column into multiple columns for easy selection and aggregation.

---

## Input

- **Data** – Required  
  A table that contains the column whose values will be expanded into individual columns.

---

## Output

| Output Type | Format  | Description                                                         |
| ----------- | ------- | ------------------------------------------------------------------- |
| **Data**    | Tabular | Transformed dataset with binary columns representing unique values. |

---

## Configuration Fields

| Field Name           | Description                                                                |
| -------------------- | -------------------------------------------------------------------------- |
| **Column to Unfold** | Required. The column whose unique values will be used as new column names. |
| **Include Original** | Optional. If enabled, retains the original columns in the output.          |

---

## Sample Input

| ID  | Category |
| --- | -------- |
| 1   | A        |
| 2   | B        |
| 3   | A        |
| 4   | C        |
| 5   | B        |

---

## Sample Configuration

| Field            | Value    |
| ---------------- | -------- |
| Column to Unfold | Category |
| Include Original | Disabled |

---

## Sample Output

| ID  | A   | B   | C   |
| --- | --- | --- | --- |
| 1   | 1   | 0   | 0   |
| 2   | 0   | 1   | 0   |
| 3   | 1   | 0   | 0   |
| 4   | 0   | 0   | 1   |
| 5   | 0   | 1   | 0   |

> When **Include Original** is enabled, the original "Category" column will appear alongside the binary columns.
