subscript(_:)
Creates a subset of the column by masking its elements with another untyped column.
Declaration
subscript(mask: MLUntypedColumn) -> MLUntypedColumn { get }Parameters
- mask:
An untyped column indicating whether elements should be removed (a default value) or included (any nondefault value) in the derived column.
Return Value
A new column.
Overview
Use this untyped column–based subscript to create a new column by masking a subset of the elements. The derived column will not include elements where mask contains a default value for its underlying type, such as:
0in untypedIntcolumns0.0in untypedDoublecolumnsAn empty string in untyped
Stringcolumns
The derived column includes elements where the masking column has any other (nondefault) value.
See subscript(_:) from MLDataTable for an example.