---
title: "subscript(_:)"
framework: createml
role: symbol
role_heading: Instance Subscript
path: "createml/mluntypedcolumn/subscript(_:)-9hr32"
---

# subscript(_:)

Creates a subset of the column by masking its elements with another untyped column.

## Declaration

```swift
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

Return Value A new column.

## Overview

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: 0 in untyped Int columns 0.0 in untyped Double columns An empty string in untyped String columns The derived column includes elements where the masking column has any other (nondefault) value. See subscript(_:) from MLDataTable for an example.

## See Also

### Masking elements to generate an untyped column

- [subscript(_:)](createml/mluntypedcolumn/subscript(_:).md)
- [subscript(_:)](createml/mluntypedcolumn/subscript(_:)-8ot43.md)
