---
title: "subscript(_:)"
framework: createml
role: symbol
role_heading: Instance Subscript
path: "createml/mldatacolumn/subscript(_:)-1n3x"
---

# subscript(_:)

Returns a MLDataColumn containing only the elements for which the corresponding mask has a nonzero or non-default value.

## Declaration

```swift
subscript(mask: MLUntypedColumn) -> MLDataColumn<Element> { get }
```

## Parameters

- `mask`: A MLUntypedColumn with the same element count as this MLUntypedColumn.

## Return Value

Return Value A MLUntypedColumn containing the subsequence of this MLUntypedColumn’s elements indicated by the mask MLUntypedColumn.

## See Also

### Masking elements to generate a column

- [subscript(_:)](createml/mldatacolumn/subscript(_:)-78irf.md)
