---
title: "init(column:)"
framework: createml
role: symbol
role_heading: Initializer
path: "createml/mldatacolumn/init(column:)-8uzuq"
---

# init(column:)

Creates a new column of arrays of strings from a given column whose elements can be converted to an array of strings.

## Declaration

```swift
init<T>(column: MLDataColumn<T>) where T : MLDataValueConvertible
```

## Parameters

- `column`: An doc://com.apple.createml/documentation/CreateML/MLDataColumn of elements convertible to an doc://com.apple.documentation/documentation/Swift/Array of doc://com.apple.documentation/documentation/Swift/String.

## Discussion

Discussion Use this initializer to create a column of arrays of strings from another column. Start by creating a column that is convertible to a column of arrays of strings. let stringArrayString = "[\"Array\", \"of\", \"strings\", \"1\"]" let stringArrayString2 = "[\"Array\", \"of\", \"strings\", \"2\"]" let stringsColumn = MLDataColumn([stringArrayString, stringArrayString2])

print(stringsColumn) // Prints ["["Array", "of", "strings", "1"]", "["Array", "of", "strings", "2"]"] Then use init(column:) to convert the column to a column of arrays of strings. let stringArrayColumn = MLDataColumn<[String]>(column: stringsColumn) print(stringArrayColumn) // Prints [["Array", "of", "strings", "1"], ["Array", "of", "strings", "2"]]

## See Also

### Creating a data column by converting another column

- [map(to:)](createml/mldatacolumn/map(to:).md)
- [init(column:)](createml/mldatacolumn/init(column:).md)
- [init(column:)](createml/mldatacolumn/init(column:)-5rg9u.md)
- [init(column:)](createml/mldatacolumn/init(column:)-2rxtu.md)
- [init(column:)](createml/mldatacolumn/init(column:)-86ge9.md)
- [init(column:)](createml/mldatacolumn/init(column:)-23pmx.md)
- [init(column:)](createml/mldatacolumn/init(column:)-ztkv.md)
- [init(column:)](createml/mldatacolumn/init(column:)-855l9.md)
- [init(column:)](createml/mldatacolumn/init(column:)-s8g5.md)
