subscript(_:)
Returns a column slice that includes elements that correspond to a collection of Booleans.
Declaration
subscript<C>(mask: C) -> DiscontiguousColumnSlice<WrappedElement> where C : Collection, C.Element == Bool { get }Parameters
- mask:
A Boolean collection. The subscript returns a slice that includes the column elements that correspond to the
trueelements inmask.
Overview
You can create a Boolean column for this subscript by comparing a column to a value of the column elements’ type.
let followerColumn = artists["Followers", Int.self].filled(with: 0)
let popularArtists = artists[followerColumn > 10_000_000]