Initializer

init(_:)

Creates a new column of integers from a given closed range.

Declaration

init(_ range: ClosedRange<Int>)

Parameters

range

A closed range of integer elements for the new column.

Discussion

Use this initializer to create a column of incrementing values from a closed range.

let closedRangeColumn = MLUntypedColumn(3...7)
print(closedRangeColumn)
/* Prints...
 ValueType: Int
 Values:        [3, 4, 5, 6, 7]
 */

See Also

Creating an Untyped Column

init<T>(repeating: T, count: Int)

Creates a new column with a repeating value.

init(repeating: MLDataValue, count: Int)

Creates a new column with a repeating value.

init(Range<Int>)

Creates a new column of integers from a given range.

init<S>(S)

Creates a new column from a given sequence of elements that can be converted to machine learning data values.

init<S>(S)

Creates a new column from a given sequence of machine learning data values.

init()

Creates an empty, invalid column used to remove an existing column from a data table.