init(column:)
Creates a new column of arrays of integers from a given column whose elements can be converted to an array of integers.
Declaration
init<T>(column: MLDataColumn<T>) where T : MLDataValueConvertibleParameters
- column:
An Mldatacolumn of elements convertible to an Array of Int.
Discussion
Use this initializer to create a column of arrays of integers from another column. Start by creating a column that is convertible to a column of arrays of integers.
Then use init(column:) to convert the column to a column of arrays of integers.
let intsColumn = MLDataColumn<Int>(column: stringsColumn)
print(intsColumn) // Prints [1, 2, 3, 4, 5]