One Logo Pool Ball
TabularData · IOS API REFERENCE

DataFrame

struct · iOS 15.0+ · SDK 27.1

@dynamicMemberLookup struct DataFrame

A collection that arranges data in rows and columns.

Members (66)

init · iOS 15.0+

init

TypeScript
static initCsvDataColumnsRowsTypesOptions(data: ArrayBuffer, columns?: (Array<string>) | null, rows?: (SDKHandle) | null, types?: Record<string, CSVType>, options?: CSVReadingOptions): DataFrame
Swift declaration
init(csvData data: Data, columns: [String]? = nil, rows: Range<Int>? = nil, types: [String : CSVType] = [:], options: CSVReadingOptions = .init()) throws

Creates a data frame from CSV data. - Parameters: - data: The contents of a CSV file in a <doc://com.apple.documentation/documentation/Foundation/Data> instance. - columns: An array of column names; Set to `nil` to use every column in the CSV file. - rows: A range of indices; Set to `nil` to use every row in the CSV file. - types: A dictionary of column names and their CSV types. The data frame infers the types for column names that aren't in the dictionary. - options: The options that tell the data frame how to read the CSV data. - Throws: A `CSVReadingError` instance.

init · iOS 15.0+

init

TypeScript
static initJsonDataColumnsTypesOptions(data: ArrayBuffer, columns?: (Array<string>) | null, types?: Record<string, JSONType>, options?: JSONReadingOptions): DataFrame
Swift declaration
init(jsonData data: Data, columns: [String]? = nil, types: [String : JSONType] = [:], options: JSONReadingOptions = .init()) throws

Creates a data frame by converting JSON data. The JSON file should contain a sequence of objects where each object contains a value for every column name. Here's an example with two columns "id" and "name": [ {"id": 1, "name": "foo"}, {"id": 2, "name": "bar"}, ] - Parameters: - data: The contents of a JSON file as data. - columns: An array of column names; Set to `nil` to use every column in the JSON file. - types: A dictionary of column names and their JSON types. The data frame infers the types for column names that aren't in the dictionary. - options: The options that instruct how the data frame reads the JSON file. - Throws: A `JSONReadingError` instance.

method · iOS 15.0+

columnNames

TypeScript
columnNames(alias: string): Array<string>
Swift declaration
func columnNames(forAlias alias: String) -> [String]

Returns the column names for an alias. Use this method to discover whether an alias refers to more than one column. For example, a data frame may have multiple columns with the same name after you call its ``joined(_:on:kind:)-6moa8`` method.

get · iOS 15.0+

description

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

A text representation of the data frame.

method · iOS 15.0+

removeAlias

TypeScript
removeAlias(alias: string): void
Swift declaration
mutating func removeAlias(_ alias: String)

Removes an alternative name for a column. - Parameter alias: An additional name for the column.

get · iOS 15.0+

customMirror

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

A mirror that reflects the data frame.

method · iOS 15.0+

removeColumn

TypeScript
removeColumn(name: string): AnyColumn
Swift declaration
@discardableResult mutating func removeColumn(_ name: String) -> AnyColumn

Removes a column you select by its name from the data frame. - Parameter name: The name of a column in the data frame. - Returns: The column the method removes from the data frame.

method · iOS 15.0+

removeColumn

TypeScript
removeColumn71940(id: ColumnID<unknown>): Column<unknown>
Swift declaration
@discardableResult mutating func removeColumn<T>(_ id: ColumnID<T>) -> Column<T>

Removes a column you select by its column identifier from the data frame. - Parameter id: The identifier of a column in the data frame. - Returns: The column the method removes from the data frame.

method · iOS 15.0+

renameColumn

TypeScript
renameColumn(name: string, newName: string): void
Swift declaration
mutating func renameColumn(_ name: String, to newName: String)

Renames a column in the data frame. - Parameters: - name: The name of a column in the data frame. - newName: The new name for the column. The new name must not be the same as another column in the data frame.

subscript · iOS 15.0+

subscript

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

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

method · iOS 15.0+

indexOfColumn

TypeScript
indexOfColumn(columnName: string): (number) | null
Swift declaration
func indexOfColumn(_ columnName: String) -> Int?

Returns the index of a column. - Parameter columnName: The name or an alias of the column. - Returns: An integer if the column name or alias exists in the data frame; otherwise, `nil`. This method's complexity is O(*1*).

method · iOS 15.0+

replaceColumn

TypeScript
replaceColumnWith(id: ColumnID<unknown>, newColumn: AnyColumn): void
Swift declaration
mutating func replaceColumn<T>(_ id: ColumnID<T>, with newColumn: AnyColumn)

Replaces a column in the data frame, by column identifier, with a type-erased column. - Parameters: - id: The identifier of a column in the data frame. - newColumn: Another column that replaces the column.

method · iOS 15.0+

replaceColumn

TypeScript
replaceColumnWith45742(id: ColumnID<unknown>, newColumn: Column<unknown>): void
Swift declaration
mutating func replaceColumn<T, U>(_ id: ColumnID<T>, with newColumn: Column<U>)

Replaces a column in the data frame, by column identifier, with a typed column. - Parameters: - id: The identifier of a column in the data frame. - newColumn: Another column that replaces the column.

method · iOS 15.0+

replaceColumn

TypeScript
replaceColumnWith80022(name: string, newColumn: AnyColumn): void
Swift declaration
mutating func replaceColumn(_ name: String, with newColumn: AnyColumn)

Replaces a column in the data frame, by name, with a type-erased column. - Parameters: - name: The name of a column in the data frame. - newColumn: Another column that replaces the column.

method · iOS 15.0+

replaceColumn

TypeScript
replaceColumnWith91187(name: string, newColumn: Column<unknown>): void
Swift declaration
mutating func replaceColumn<T>(_ name: String, with newColumn: Column<T>)

Replaces a column in the data frame, by name, with a typed column. - Parameters: - name: The name of a column in the data frame. - newColumn: Another column that replaces the column.

method · iOS 15.0+

appendEmptyRow

TypeScript
appendEmptyRow(): void
Swift declaration
mutating func appendEmptyRow()

Adds an empty row to the data frame. Each value in an empty row is `nil`.

method · iOS 15.0+

combineColumns

TypeScript
combineColumnsIntoTransform(columnID1: ColumnID<unknown>, columnID2: ColumnID<unknown>, newColumnName: string, transform: ((arg0: (unknown) | null, arg1: (unknown) | null) => (unknown) | null)): void
Swift declaration
mutating func combineColumns<E1, E2, R>(_ columnID1: ColumnID<E1>, _ columnID2: ColumnID<E2>, into newColumnName: String, transform: (E1?, E2?) throws -> R?) rethrows

Merges two columns that you select by column identifier into a new column. - Parameters: - columnID1: The identifier of a column. - columnID2: The identifier of another column. - newColumnName: The name of the new column that replaces the two columns. - transform: A closure that combines the corresponding elements of the two columns into one element. The merged column replaces the original column.

method · iOS 15.0+

combineColumns

TypeScript
combineColumnsIntoTransform49209(columnName1: string, columnName2: string, newColumnName: string, transform: ((arg0: (unknown) | null, arg1: (unknown) | null) => (unknown) | null)): void
Swift declaration
mutating func combineColumns<E1, E2, R>(_ columnName1: String, _ columnName2: String, into newColumnName: String, transform: (E1?, E2?) throws -> R?) rethrows

Merges two columns that you select by name into a new column. - Parameters: - columnName1: The name of a column. - columnName2: The name of another column. - newColumnName: The name of the new column that replaces the two columns. - transform: A closure that combines the corresponding elements of the two columns into one element. The merged column replaces the original column.

method · iOS 15.0+

combineColumns

TypeScript
combineColumnsIntoTransform30675(columnID1: ColumnID<unknown>, columnID2: ColumnID<unknown>, columnID3: ColumnID<unknown>, newColumnName: string, transform: ((arg0: (unknown) | null, arg1: (unknown) | null, arg2: (unknown) | null) => (unknown) | null)): void
Swift declaration
mutating func combineColumns<E1, E2, E3, R>(_ columnID1: ColumnID<E1>, _ columnID2: ColumnID<E2>, _ columnID3: ColumnID<E3>, into newColumnName: String, transform: (E1?, E2?, E3?) throws -> R?) rethrows

Merges three columns that you select by column identifier into a new column. - Parameters: - columnID1: The identifier of a column. - columnID2: The identifier of a second column. - columnID3: The identifier of a third column. - newColumnName: The name of the new column that replaces the three columns. - transform: A closure that combines the corresponding elements of the three columns into one element. The merged column replaces the original column.

method · iOS 15.0+

combineColumns

TypeScript
combineColumnsIntoTransform27399(columnName1: string, columnName2: string, columnName3: string, newColumnName: string, transform: ((arg0: (unknown) | null, arg1: (unknown) | null, arg2: (unknown) | null) => (unknown) | null)): void
Swift declaration
mutating func combineColumns<E1, E2, E3, R>(_ columnName1: String, _ columnName2: String, _ columnName3: String, into newColumnName: String, transform: (E1?, E2?, E3?) throws -> R?) rethrows

Merges three columns that you select by name into a new column. - Parameters: - columnName1: The name of a column. - columnName2: The name of a second column. - columnName3: The name of a third column. - newColumnName: The name of the new column that replaces the three columns. - transform: A closure that combines the corresponding elements of the three columns into one element. The merged column replaces the original column.

method · iOS 15.4+

containsColumn

TypeScript
containsColumn(id: ColumnID<unknown>): boolean
Swift declaration
func containsColumn<T>(_ id: ColumnID<T>) -> Bool

Returns a Boolean value indicating whether the data frame contains a column matching a column ID. - Parameter id: A column ID.

method · iOS 16.0+

containsColumn

TypeScript
containsColumn17205(name: string): boolean
Swift declaration
func containsColumn(_ name: String) -> Bool

Returns a Boolean value indicating whether the data frame contains a column. - Parameters: - name: A column name.

method · iOS 15.0+

transformColumn

TypeScript
transformColumn(id: ColumnID<unknown>, transform: ((arg0: unknown) => (unknown) | null)): void
Swift declaration
mutating func transformColumn<From, To>(_ id: ColumnID<From>, _ transform: (From) throws -> To?) rethrows

Applies a transform closure that modifies the nonempty elements of a column you select by column identifier. - Parameters: - id: The identifier of a column in the data frame. - transform: A closure that transforms each non-`nil` element in the column.

method · iOS 15.0+

transformColumn

TypeScript
transformColumn10996(id: ColumnID<unknown>, transform: ((arg0: (unknown) | null) => (unknown) | null)): void
Swift declaration
mutating func transformColumn<From, To>(_ id: ColumnID<From>, _ transform: (From?) throws -> To?) rethrows

Applies a transform closure that modifies the elements of a column you select by column identifier. - Parameters: - id: The identifier of a column in the data frame. - transform: A closure that transforms each element in the column.

method · iOS 15.0+

transformColumn

TypeScript
transformColumn83894(name: string, transform: ((arg0: unknown) => (unknown) | null)): void
Swift declaration
mutating func transformColumn<From, To>(_ name: String, _ transform: (From) throws -> To?) rethrows

Applies a transform closure that modifies the nonempty elements of a column you select by name. - Parameters: - name: The name of a column in the data frame. - transform: A closure that transforms each element in the column.

method · iOS 15.0+

transformColumn

TypeScript
transformColumn83300(name: string, transform: ((arg0: (unknown) | null) => (unknown) | null)): void
Swift declaration
mutating func transformColumn<From, To>(_ name: String, _ transform: (From?) throws -> To?) rethrows

Applies a transform closure that modifies the elements of a column you select by name. - Parameters: - name: The name of a column in the data frame. - transform: A closure that transforms each element in the column.

get · iOS 15.0+

debugDescription

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

A text representation of the data frame suitable for debugging.

init · iOS 15.0+

init

TypeScript
static initContentsOfCSVFileColumnsRowsTypesOptions(url: string, columns?: (Array<string>) | null, rows?: (SDKHandle) | null, types?: Record<string, CSVType>, options?: CSVReadingOptions): DataFrame
Swift declaration
init(contentsOfCSVFile url: URL, columns: [String]? = nil, rows: Range<Int>? = nil, types: [String : CSVType] = [:], options: CSVReadingOptions = .init()) throws

Creates a data frame from a CSV file. - Parameters: - url: A URL for a CSV file. - columns: An array of column names; Set to `nil` to use every column in the CSV file. - rows: A range of indices; Set to `nil` to use every row in the CSV file. - types: A dictionary of column names and their CSV types. The data frame infers the types for column names that aren't in the dictionary. - options: The options that tell the data frame how to read the CSV file. - Throws: A `CSVReadingError` instance.

init · iOS 15.0+

init

TypeScript
static initContentsOfJSONFileColumnsTypesOptions(url: string, columns?: (Array<string>) | null, types?: Record<string, JSONType>, options?: JSONReadingOptions): DataFrame
Swift declaration
init(contentsOfJSONFile url: URL, columns: [String]? = nil, types: [String : JSONType] = [:], options: JSONReadingOptions = .init()) throws

Creates a data frame by reading a JSON file. The JSON file should contain a sequence of objects where each object contains a value for every column name. Here's an example with two columns "id" and "name": [ {"id": 1, "name": "foo"}, {"id": 2, "name": "bar"}, ] - Parameters: - url: A URL to a JSON file. - columns: An array of column names; Set to `nil` to use every column in the JSON file. - types: A dictionary of column names and their JSON types. The data frame infers the types for column names that aren't in the dictionary. - options: The options that instruct how the data frame reads the JSON file. - Throws: A `JSONReadingError` instance.

init · iOS 15.0+

init

TypeScript
static initContentsOfSFrameDirectoryColumnsRows(url: string, columns?: (Array<string>) | null, rows?: (SDKHandle) | null): DataFrame
Swift declaration
init(contentsOfSFrameDirectory url: URL, columns: [String]? = nil, rows: Range<Int>? = nil) throws

Creates a data frame from a Turi Create scalable data frame. - Parameters: - url: A URL to an `SFrame` directory. - columns: An array of column names; Set to `nil` to use every column in the `SFrame`. - rows: A range of indices; Set to `nil` to use every row in the `SFrame`. - Throws: An `SFrameReadingError` instance.

subscript · iOS 15.0+

subscript

TypeScript
subscriptRow(index: number): DataFrame_Row
Swift declaration
subscript(row index: Int) -> DataFrame.Row { get set }

Accesses a row by its index. - Parameter index: The index of a row.

get · iOS 15.0+

base

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

The underlying data frame. For a ``DataFrame`` instance, this property is equivalent to `self`.

get · iOS 15.0+

rows

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

The entire data frame 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 data frame as a collection of rows.

method · iOS 15.0+

sort

TypeScript
sortOnBy(columnID: ColumnID<unknown>, areInIncreasingOrder: ((arg0: unknown, arg1: unknown) => boolean)): void
Swift declaration
mutating func sort<T>(on columnID: ColumnID<T>, by areInIncreasingOrder: (T, T) throws -> Bool) rethrows

Arranges the rows of a data frame according to a column that you select by its column identifier, with a predicate. - Parameters: - columnID: The identifier of a column. - areInIncreasingOrder: A closure that returns a Boolean that indicates whether the two elements are in increasing order. > Note: Elements with a value of `nil` are less than all non-`nil` values.

method · iOS 15.0+

sort

TypeScript
sortOnOrder(columnName: string, order?: Order): void
Swift declaration
mutating func sort(on columnName: String, order: Order = .ascending)

Arranges the rows of a data frame according to a column that you select by its name. - Parameters: - columnName: The name of a column. - order: A sorting order. This is a convenience method that only works for columns of the following types: - <doc://com.apple.documentation/documentation/Swift/Bool> - <doc://com.apple.documentation/documentation/Swift/Int> - <doc://com.apple.documentation/documentation/Swift/Float> - <doc://com.apple.documentation/documentation/Swift/Double> - <doc://com.apple.documentation/documentation/Foundation/Date> > Note: Elements with a value of `nil` are less than all non-`nil` values.

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 data frame. - Parameters: - rows: The number of rows in the data frame. - columns: The number of columns in the data frame.

method · iOS 15.0+

append

TypeScript
appendValuesByColumn(dictionary: Record<string, (unknown) | null>): void
Swift declaration
mutating func append(valuesByColumn dictionary: [String : Any?])

Adds a dictionary's values as a row to the data frame. - Parameter dictionary: A dictionary of values whose key is a column's name. Each key in the dictionary must be the name or alias of a column in the data frame. Each value in the dictionary must be of the same types as the corresponding column.

method · iOS 15.0+

append

TypeScript
appendRow(row: DataFrame_Row): void
Swift declaration
mutating func append(row: DataFrame.Row)

Adds a row of values to the data frame. - Parameter row: A row from a data frame.

method · iOS 15.0+

append

TypeScript
appendColumn(column: Column<unknown>): void
Swift declaration
mutating func append<T>(column: Column<T>)

Adds a typed column to the end of the data frame. - Parameter column: A typed column. The column must have the same number of rows as the data frame, and must not have the same name as another column in the data frame. The column you append becomes the last column and has the highest index in the data frame.

method · iOS 15.0+

append

TypeScript
appendColumn3352(column: AnyColumn): void
Swift declaration
mutating func append(column: AnyColumn)

Adds a type-erased column to the end of the data frame. - Parameter column: A type-erased column. The column must have the same number of rows as the data frame, and must not have the same name as another column in the data frame.

method · iOS 15.0+

append

TypeScript
appendRowsOf(other: DataFrame): void
Swift declaration
mutating func append(rowsOf other: DataFrame)

Adds the rows of another data frame that has the same column names and types. This method raises a fatal error if the data frame columns don't match. The following code shows how to check that the columns match. ``` let sameColumns = left.columns.count == right.columns.count && zip(left.columns, right.columns).allSatisfy { $0.name == $1.name && $0.wrappedElementType == $1.wrappedElementType } ``` - Parameter other: Another data frame that has the same number of columns. The columns in `other` must have the same names and types as the columns in the data frame.

method · iOS 15.0+

append

TypeScript
append(other: DataFrame_Slice): void
Swift declaration
mutating func append(_ other: DataFrame.Slice)

Adds the rows of a slice from a data frame. - Parameter other: A slice of a data frame. The columns in `other` that have the same name as columns in the data frame must also have the same type. The method ignores columns in `other` that don't exist in the data frame. The method fills the values for columns in the data frame that don't exist in `other` to `nil`.

method · iOS 15.0+

append

TypeScript
append64411(other: DataFrame): void
Swift declaration
mutating func append(_ other: DataFrame)

Adds the rows of another data frame. The method ignores columns in `other` that don't exist in the data frame. It fills the values for columns in the data frame that don't exist in `other` to `nil`. It raises a fatal error if columns with the same name have different types. The following code shows how to check that the columns match. ``` func columnTypesAreEqual(_ left: DataFrame, _ right: DataFrame) -> Bool { for rightColumn in right.columns { guard let index = left.indexOfColumn(rightColumn.name) else { continue } let leftColumn = left.columns[index] if leftColumn.wrappedElementType != rightColumn.wrappedElementType { return false } } return true } ``` - Parameter other: Another data frame. The columns in `other` that have the same name as columns in the data frame must also have the same type.

subscript · iOS 15.0+

subscript

TypeScript
subscriptColumn(index: number): AnyColumn
Swift declaration
subscript(column index: Int) -> AnyColumn { get set }

Accesses a column by its index. - Parameter index: The index of a column.

method · iOS 15.0+

filter

TypeScript
filterOn(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 data frame. - 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+

filter

TypeScript
filter(isIncluded: ((arg0: DataFrame_Row) => boolean)): DataFrame_Slice
Swift declaration
func filter(_ isIncluded: (DataFrame.Row) throws -> Bool) rethrows -> DataFrame.Slice

Returns a selection of rows that satisfy a predicate. - Parameter isIncluded: A predicate closure that receives an row and returns a Boolean that indicates whether the slice includes that row. - Returns: A data frame slice that contains the rows that satisfy the predicate.

method · iOS 15.0+

insert

TypeScript
insertRowAt(row: DataFrame_Row, index: number): void
Swift declaration
mutating func insert(row: DataFrame.Row, at index: Int)

Adds a row of values at a position in the data frame. - Parameters: - row: A row from a data frame. - index: A row position in the data frame. The method inserts the new row before the row currently at `index`. If you pass the array's `shape.rows` property as the `index` parameter, the method appends the new row to the data frame.

method · iOS 15.0+

insert

TypeScript
insertColumnAt(column: Column<unknown>, index: number): void
Swift declaration
mutating func insert<T>(column: Column<T>, at index: Int)

Adds a typed column at a position in the data frame. - Parameters: - column: A typed column. The column must have the same number of rows as the data frame, and must not have the same name as another column in the data frame. - index: A column position in the data frame. The method inserts the new column before the column currently at `index`. If you pass the array's `shape.columns` property as the `index` parameter, the method appends the new column to the data frame.

method · iOS 15.0+

insert

TypeScript
insertColumnAt82928(column: AnyColumn, index: number): void
Swift declaration
mutating func insert(column: AnyColumn, at index: Int)

Adds a type-erased column at a position in the data frame. - Parameters: - column: A type-erased column. The column must have the same number of rows as the data frame, and must not have the same name as another column in the data frame. - index: A column position in the data frame. The method inserts the new column before the column currently at `index`. If you pass the array's `shape.column` property as the `index` parameter, the method appends the new column to the data frame.

method · iOS 15.0+

prefix

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

Returns a slice that contains the initial rows up to a maximum length. - Parameter maxLength: The maximum number of rows.

method · iOS 15.0+

suffix

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

Returns a slice that contains the final rows up to a maximum length. - Parameter maxLength: The maximum number of rows.

init · iOS 15.0+

init

TypeScript
static initColumns(columns: Array<AnyColumn>): DataFrame
Swift declaration
init<S>(columns: S) where S : Sequence, S.Element == AnyColumn

Creates a new data frame from a sequence of columns. - Parameter columns: A sequence of type-erased columns.

get · iOS 15.0+

columns

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

The entire data frame 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.

method · iOS 15.0+

addAlias

TypeScript
addAlias(alias: string, columnName: string): void
Swift declaration
mutating func addAlias(_ alias: String, forColumn columnName: String)

Adds an alternative name for a column. - Parameters: - alias: An additional name for the column. - columnName: The name of a column.

method · iOS 15.0+

removeRow

TypeScript
removeRow(index: number): void
Swift declaration
mutating func removeRow(at index: Int)

Removes a row from the data frame. - Parameter index: A row position in the data frame.

method · iOS 15.0+

selecting

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

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

init · iOS 15.0+

init

TypeScript
static init(): DataFrame
Swift declaration
init()

Creates an empty data frame with no rows or columns.

init · iOS 15.0+

init

TypeScript
static init64035(other: DataFrame_Slice): DataFrame
Swift declaration
init(_ other: DataFrame.Slice)

Creates a new data frame with a slice of rows from another data frame. - Parameter other: A row slice from another data frame.

subscript · iOS 15.0+

subscript

TypeScript
subscript(id: ColumnID<unknown>): Column<unknown>
Swift declaration
subscript<T>(id: ColumnID<T>) -> Column<T> { get set }

Accesses a column by its column identifier. - Parameter id: The identifier of a column.

subscript · iOS 15.0+

subscript

TypeScript
subscript29591(columnName: string): AnyColumn
Swift declaration
@backDeployed(before: macOS 15.4, iOS 18.4, tvOS 18.4, watchOS 11.4, visionOS 2.4)
subscript(columnName: String) -> AnyColumn { get set }

Accesses a column by its name. - Parameter columnName: The name of a column.

subscript · iOS 15.0+

subscript

TypeScript
subscript3107(mask: Array<boolean>): DataFrame_Slice
Swift declaration
subscript<C>(mask: C) -> DataFrame.Slice where C : Collection, C.Element == Bool { get }

Returns a slice of the rows by masking its elements with a Boolean column. - Parameter mask: A Boolean column that indicates whether the method includes a row in the slice.

subscript · iOS 15.0+

subscript

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

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

subscript · iOS 15.0+

subscript

TypeScript
subscript4051(columnName: string): Array<(unknown) | null>
Swift declaration
@backDeployed(before: macOS 15.4, iOS 18.4, tvOS 18.4, watchOS 11.4, visionOS 2.4)
subscript<T>(columnName: String, type: T.Type = T.self) -> [T?] { get set }

Accesses a column as an array by its name. - Parameters: - columnName: The name of a column. - type: The type of the column.

Skipped declarations

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

DataFrame.containsColumn(_:_:)

Passing a Swift type itself is not supported.

DataFrame.append(row:)

A variable number of Swift arguments is not supported.

DataFrame.filter(on:_:_:)

Passing a Swift type itself is not supported.

DataFrame.selecting(columnNames:)

A variable number of Swift arguments is not supported.

DataFrame.subscript(_:_:)

Passing a Swift type itself is not supported.

DataFrame.subscript(column:_:)

Passing a Swift type itself is not supported.

DataFrame.init(dictionaryLiteral:)

A variable number of Swift arguments is not supported.

DataFrame.summary(of:)

A variable number of Swift arguments is not supported.

DataFrame.summary(ofColumns:)

A variable number of Swift arguments is not supported.

DataFrame.init(contentsOfCSVFile:columns:rows:options:)

Swift parameter packs cannot cross the bridge.

DataFrame.init(csvData:columns:rows:options:)

Swift parameter packs cannot cross the bridge.

DataFrame.decode(_:inColumn:using:)

Passing a Swift type itself is not supported.

DataFrame.decode(_:inColumn:using:)

Passing a Swift type itself is not supported.

DataFrame.sort(on:_:order:)

Passing a Swift type itself is not supported.

DataFrame.sort(on:order:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

DataFrame.sort(on:_:order:)

This declaration needs Swift generic type arguments. (no canonical witness for T0)

DataFrame.sort(on:_:_:order:)

This declaration needs Swift generic type arguments. (no canonical witness for T0)

DataFrame.sort(on:_:by:)

Passing a Swift type itself is not supported.

DataFrame.encodeColumn(_:_:using:)

Passing a Swift type itself is not supported.

DataFrame.encodeColumn(_:using:)

This declaration needs Swift generic type arguments. (no canonical witness for Encoder)

DataFrame.explodeColumn(_:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

DataFrame.explodeColumn(_:_:)

Passing a Swift type itself is not supported.

DataFrame.explodingColumn(_:_:)

Passing a Swift type itself is not supported.

DataFrame.explodingColumn(_:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

All TabularData types →