---
title: "subscript(_:)"
framework: createml
role: symbol
role_heading: Instance Subscript
path: "createml/mldatatable/subscript(_:)-5le8a"
---

# subscript(_:)

Creates a subset of the table given a range expression of rows.

## Declaration

```swift
subscript<R>(slice: R) -> MLDataTable where R : RangeExpression, R.Bound == Int { get }
```

## Parameters

- `slice`: An interger range expression indicating which rows to include in the new data table.

## Return Value

Return Value A new data table.
