---
title: "init(strings:)"
framework: createml
role: symbol
role_heading: Initializer
path: "createml/mluntypedcolumn/init(strings:)"
---

# init(strings:)

Creates a new column of strings by converting the elements of another column.

## Declaration

```swift
init(strings: MLUntypedColumn)
```

## Parameters

- `strings`: A column with elements that are convertible to string.

## Return Value

Return Value A new untyped column of doubles; otherwise an invalid column if any element of the given column cannot be converted to String.

## Discussion

Discussion Use this initializer to create a column of strings from another column. As an example, to create a column with this initializer, first start with a column that is convertible to strings. let doublesColumn = MLUntypedColumn([1.0, 2.718, 3.14, 4.2, 5.1]) print(doublesColumn) /* Prints...  ValueType: Double  Values:        [1.0, 2.718, 3.14, 4.2, 5.1]  */ Then use init(strings:) to convert the column to a column of strings. let stringsColumn = MLUntypedColumn(strings: doublesColumn) print(stringsColumn) /* Prints...  ValueType: String  Values:        [1, 2.718, 3.14, 4.2, 5.1]  */

## See Also

### Creating an untyped column by converting another column

- [init(ints:)](createml/mluntypedcolumn/init(ints:).md)
- [init(doubles:)](createml/mluntypedcolumn/init(doubles:).md)
- [init(sequences:)](createml/mluntypedcolumn/init(sequences:).md)
- [init(dictionaries:)](createml/mluntypedcolumn/init(dictionaries:).md)
- [init(multiArrays:)](createml/mluntypedcolumn/init(multiarrays:).md)
