---
title: "condense(columnNamed:to:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mldatatable/condense(columnnamed:to:)"
---

# condense(columnNamed:to:)

Creates a new data table where duplicate row values in the given column are condensed into a new sequence-type column.

## Declaration

```swift
func condense(columnNamed: String, to: String) -> MLDataTable
```

## Parameters

- `columnNamed`: The name of the column to condense.
- `to`: The name of the new condensed column.

## Return Value

Return Value A new data table.

## Discussion

Discussion This function performs the inverse of expand(columnNamed:to:).
