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

# expand(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 expand(columnNamed: String, to: String) -> MLDataTable
```

## Parameters

- `columnNamed`: The name of the column to expand.
- `to`: The name of the new expanded column.

## Return Value

Return Value A new data table.

## Discussion

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