---
title: "unpack(columnNamed:valueTypes:indexSubset:keySubset:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mldatatable/unpack(columnnamed:valuetypes:indexsubset:keysubset:)"
---

# unpack(columnNamed:valueTypes:indexSubset:keySubset:)

Creates a new data table with additional columns that contain the unpacked collections in the given column.

## Declaration

```swift
func unpack(columnNamed: String, valueTypes: [MLDataValue.ValueType]? = nil, indexSubset: [Int]? = nil, keySubset: [String]? = nil) -> MLDataTable
```

## Parameters

- `columnNamed`: The name of the column to unpack. The underlying type of the column must be either doc://com.apple.createml/documentation/CreateML/MLDataValue/SequenceType or doc://com.apple.createml/documentation/CreateML/MLDataValue/DictionaryType.
- `valueTypes`: An array of the underlying types for the new, unpacked columns. If nil, the method infers the underlying types in the sequence or dictionary.
- `indexSubset`: The subset of indicies to unpack from a specified sequence-typed column. If nil, the method unpacks all indicies.
- `keySubset`: The subset of keys to unpack from a specified dictionary-typed column. If nil, the method unpacks all keys.

## Return Value

Return Value A new data table.

## Discussion

Discussion This function performs the inverse of pack(columnsNamed:to:type:filling:).
