Generic Subscript

subscript(_:_:)

Retrieves a column with the specified name and type.

Declaration

subscript<T>(columnName: String, columnType: T.Type) -> MLDataColumn<T>? where T : MLDataValueConvertible { get }

Parameters

columnName

The name of the column to extract.

columnType

The underlying type of the column’s content.

Return Value

A new MLDataColumn with the specified name and type, if it exists; otherwise nil.

Discussion

Use this subscript to get a typed MLDataColumn, which is easier to work with than a MLUntypedColumn returned from subscript(_:).

See Also

Accessing Columns

subscript<Element>(String) -> MLDataColumn<Element>

Retrieves or adds a typed column with the specified name.

subscript(String) -> MLUntypedColumn

Retrieves or adds an untyped column with the specified name.