init(_:)
Creates a new column from a given sequence of elements.
Declaration
init<S>(_ source: S) where Element == S.Element, S : SequenceParameters
- source:
A sequence of elements for the new column.
Discussion
Use this initializer to create a column from a sequence of any type that conforms to MLDataValueConvertible.
let sequenceColumn = MLDataColumn([2, 3, 5, 7, 11])
print(sequenceColumn) // Prints [2, 3, 5, 7, 11]