One Logo Pool Ball
TabularData · IOS API REFERENCE

DataFrame.Slice

struct · iOS 15.0+ · SDK 27.1

@dynamicMemberLookup struct Slice

A set of a data frame's rows you create by using a method from a data frame instance or another data frame slice. A slice is an arbitrary set of rows from a data frame. For example, a slice might contain rows 0–3, 5–9, and 101 from its underlying data frame.

Members (21)

get · iOS 15.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A text representation of the data frame slice.

get · iOS 15.0+

customMirror

TypeScript
get customMirror(): SDKHandle
Swift declaration
var customMirror: Mirror { get }

A mirror that reflects the data frame slice.

subscript · iOS 15.0+

subscript

TypeScript
subscriptDynamicMember(columnName: string): AnyColumnSlice
Swift declaration
subscript(dynamicMember columnName: String) -> AnyColumnSlice { get }

Returns a column you select by its name to support dynamic-member lookup. - Parameter columnName: The name of a column.

get · iOS 15.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A text representation of the data frame slice suitable for debugging.

get · iOS 15.0+

base

TypeScript
get base(): DataFrame
Swift declaration
var base: DataFrame { get }

The underlying data frame.

get · iOS 15.0+

rows

TypeScript
get rows(): DataFrame_Rows
Swift declaration
var rows: DataFrame.Rows { get set }

The entire slice as a collection of rows.

set · iOS 15.0+

rows

TypeScript
set rows(value: DataFrame_Rows)
Swift declaration
var rows: DataFrame.Rows { get set }

The entire slice as a collection of rows.

get · iOS 15.0+

shape

TypeScript
get shape(): { "rows": number; "columns": number }
Swift declaration
var shape: (rows: Int, columns: Int) { get }

The number of rows and columns in the slice. - Parameters: - rows: The number of rows in the slice. - columns: The number of columns in the slice.

method · iOS 15.0+

filter

TypeScript
filter(columnID: ColumnID<unknown>, isIncluded: ((arg0: (unknown) | null) => boolean)): DataFrame_Slice
Swift declaration
func filter<T>(on columnID: ColumnID<T>, _ isIncluded: (T?) throws -> Bool) rethrows -> DataFrame.Slice

Returns a selection of rows that satisfy a predicate in the columns you select by column identifier. - 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. - Returns: A data frame slice that contains the rows that satisfy the predicate.

method · iOS 15.0+

prefix

TypeScript
prefixUpTo(position: number): DataFrame_Slice
Swift declaration
func prefix(upTo position: Int) -> DataFrame.Slice

Returns a new slice that contains the initial elements of the original slice up to, but not including, the element at a position. - Parameter position: A valid index to an element in the slice. - Returns: A new slice of the underlying data frame.

method · iOS 15.0+

prefix

TypeScript
prefixThrough(position: number): DataFrame_Slice
Swift declaration
func prefix(through position: Int) -> DataFrame.Slice

Returns a new slice that contains the initial elements of the original slice up to and including the element at a position. - Parameter position: A valid index to an element in the slice. - Returns: A new slice of the underlying data frame.

method · iOS 15.0+

prefix

TypeScript
prefix(length: number): DataFrame_Slice
Swift declaration
func prefix(_ length: Int) -> DataFrame.Slice

Returns a new slice that contains the initial elements of the original slice. - Parameter length: The number of elements in the new slice. The length must be greater than or equal to zero and less than or equal to the number of elements in the original slice. - Returns: A new slice of the underlying data frame.

method · iOS 15.0+

suffix

TypeScript
suffixFrom(position: number): DataFrame_Slice
Swift declaration
func suffix(from position: Int) -> DataFrame.Slice

Returns a new slice that contains the final elements of the original slice beginning with the element at a position. - Parameter position: A valid index to an element in the slice. - Returns: A new slice of the underlying data frame.

method · iOS 15.0+

suffix

TypeScript
suffix(length: number): DataFrame_Slice
Swift declaration
func suffix(_ length: Int) -> DataFrame.Slice

Returns a new slice that contains the final elements of the original slice. - Parameter length: The number of elements in the new slice. The length must be greater than or equal to zero and less than or equal to the number of elements in the original slice. - Returns: A new slice of the underlying data frame.

get · iOS 15.0+

columns

TypeScript
get columns(): Array<AnyColumnSlice>
Swift declaration
var columns: [AnyColumnSlice] { get }

The entire slice as a collection of columns.

method · iOS 15.0+

grouped

TypeScript
grouped(columnName: string): SDKHandle
Swift declaration
func grouped(by columnName: String) -> any RowGroupingProtocol

Creates a grouping of rows that the method selects by choosing unique values in a column. - Parameter columnName: The name of a column.

method · iOS 15.0+

summary

TypeScript
summary(): DataFrame
Swift declaration
func summary() -> DataFrame

Generates a data frame that summarizes the columns of the data frame slice.

method · iOS 15.0+

selecting

TypeScript
selecting(columnNames: Array<string>): DataFrame_Slice
Swift declaration
func selecting<S>(columnNames: S) -> DataFrame.Slice where S : Sequence, S.Element == String

Generates a data frame slice that includes the columns you select with a sequence of names. - Parameter columnNames: A sequence of column names. - Returns: A new data frame slice.

subscript · iOS 15.0+

subscript

TypeScript
subscript(columnID: ColumnID<unknown>): DiscontiguousColumnSlice<unknown>
Swift declaration
subscript<T>(columnID: ColumnID<T>) -> DiscontiguousColumnSlice<T> { get }

Returns a column you select by its column identifier. - Parameter id: The identifier of a column.

subscript · iOS 15.0+

subscript

TypeScript
subscript75194(columnName: string): AnyColumnSlice
Swift declaration
subscript(columnName: String) -> AnyColumnSlice { get }

Returns a column you select by its name. - Parameter columnName: The name of a column.

subscript · iOS 15.0+

subscript

TypeScript
subscript87752(columnNames: Array<string>): DataFrame_Slice
Swift declaration
subscript<S>(columnNames: S) -> DataFrame.Slice where S : Sequence, S.Element == String { get }

Generates a data frame slice that includes the columns in a sequence of column names. - Parameter columnNames: A sequence of column names. - Returns: A new data frame slice.

Skipped declarations

6 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

DataFrame.Slice.subscript(_:_:)

Passing a Swift type itself is not supported.

DataFrame.Slice.subscript(column:_:)

Passing a Swift type itself is not supported.

DataFrame.Slice.filter(on:_:_:)

Passing a Swift type itself is not supported.

DataFrame.Slice.selecting(columnNames:)

A variable number of Swift arguments is not supported.

DataFrame.Slice.summary(of:)

A variable number of Swift arguments is not supported.

DataFrame.Slice.summary(ofColumns:)

A variable number of Swift arguments is not supported.

All TabularData types →