> 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/functions-and-expressions/functions/table/encode.md).

# ENCODE

ENCODE(`column`)&#x20;

Returns a column with numbers assigned to each unique value of the referenced `column`. Used for columns with categorical data that need to be converted to numbers.

### Arguments <a href="#arguments" id="arguments"></a>

| Argument | Description                           |
| -------- | ------------------------------------- |
| `column` | String column with categorical values |

### Output <a href="#output" id="output"></a>

Column of integers corresponding to the unique values in `column`.

### Example

{% embed url="<https://datawrapper.dwcdn.net/QutmO/1/>" %}
