---
title: "filter(_:)"
framework: tabulardata
role: symbol
role_heading: Instance Method
path: "tabulardata/rowgroupingprotocol/filter(_:)"
---

# filter(_:)

Returns a row grouping containing only the groups that satisfy a predicate.

## Declaration

```swift
func filter(_ isIncluded: (DataFrame.Slice) throws -> Bool) rethrows -> Self
```

## Parameters

- `isIncluded`: A predicate closure that takes a group and returns a Boolean that indicates whether the group is included.

## Return Value

Return Value A data frame slice that contains the rows that satisfy the predicate.
