Contents

filter(on:_:)

Returns a selection of rows that satisfy a predicate in the columns you select by column identifier.

Declaration

func filter<T>(on columnID: ColumnID<T>, _ isIncluded: (T?) throws -> Bool) rethrows -> DataFrame.Slice

Parameters

  • columnID:

    The identifier of a column in the slice.

  • isIncluded:

    A predicate closure that receives an element of the column as its argument, and returns a Boolean that indicates whether the slice includes the element’s row.

Return Value

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

See Also

Creating a Slice by Filtering Rows