One Logo Pool Ball
TabularData · IOS API REFERENCE

AnyColumn

struct · iOS 15.0+ · SDK 27.1

struct AnyColumn

A type-erased column. `AnyColumn` is a column type that conceals the type of its elements, unlike ``Column``, its typed counterpart.

Members (21)

get · iOS 15.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: Int { get }

The index of the initial element in the column.

get · iOS 15.0+

description

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

A text representation of the column.

get · iOS 15.0+

customMirror

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

A mirror that reflects the column.

get · iOS 15.0+

missingCount

TypeScript
get missingCount(): number
Swift declaration
var missingCount: Int { get }

The number of missing elements in the column.

get · iOS 15.0+

debugDescription

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

A text representation of the column suitable for debugging.

get · iOS 15.0+

name

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

The name of the column.

set · iOS 15.0+

name

TypeScript
set name(value: string)
Swift declaration
var name: String { get set }

The name of the column.

get · iOS 15.0+

count

TypeScript
get count(): number
Swift declaration
var count: Int { get }

The number of elements in the column.

method · iOS 15.0+

index

TypeScript
indexAfter(i: number): number
Swift declaration
func index(after i: Int) -> Int

Returns the index immediately after an element index. - Parameter i: A valid index to an element in the column.

method · iOS 15.0+

index

TypeScript
indexBefore(i: number): number
Swift declaration
func index(before i: Int) -> Int

Returns the index immediately before an element index. - Parameter i: A valid index to an element in the column.

method · iOS 15.0+

isNil

TypeScript
isNil(index: number): boolean
Swift declaration
func isNil(at index: Int) -> Bool

Returns a Boolean that indicates whether the element at the index is missing. - Parameter index: The location of an element in the column.

method · iOS 15.0+

append

TypeScript
appendContentsOf(other: AnyColumnSlice): void
Swift declaration
mutating func append(contentsOf other: AnyColumnSlice)

Appends the contents of a column slice to the column. - Parameter other: A column that contains elements of the same type as this column.

method · iOS 15.0+

append

TypeScript
appendContentsOf97210(other: AnyColumn): void
Swift declaration
mutating func append(contentsOf other: AnyColumn)

Appends the contents of another column to the column. - Parameter other: A column that contains elements of the same type as this column.

method · iOS 15.0+

append

TypeScript
append(element?: (unknown) | null): void
Swift declaration
mutating func append(_ element: Any?)

Appends an optional element to the column. - Parameter element: An element.

method · iOS 15.0+

remove

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

Removes an element from the column. - Parameter index: The location of an element in the column.

method · iOS 15.0+

distinct

TypeScript
distinct(): AnyColumnSlice
Swift declaration
func distinct() -> AnyColumnSlice

Generates a column slice that contains unique elements. The method only adds the first of multiple elements with the same value --- the element with the smallest index --- to the slice. - Returns: A type-erased column slice.

get · iOS 15.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: Int { get }

The index of the final element in the column.

get · iOS 15.0+

prototype

TypeScript
get prototype(): SDKHandle
Swift declaration
var prototype: any AnyColumnPrototype { get }

A prototype that creates type-erased columns with the same underlying type as the column slice. Use a type-erased column prototype to create new columns of the same type as the slice's parent column without explicitly knowing what type it is, by calling the `prototype` property's ``AnyColumnPrototype/makeColumn(capacity:)`` method. ```swift // Get a type-erased column. let someColumn: AnyColumn = dataFrame["someFeature"] // Create a new column with the same type. let newColumn = someColumn.prototype.makeColumn(capacity: 10) ```

subscript · iOS 15.0+

subscript

TypeScript
subscript(range: SDKHandle): AnyColumnSlice
Swift declaration
subscript(range: Range<Int>) -> AnyColumnSlice { get set }

Accesses a contiguous subrange of the elements. - Parameter range: A range of valid indices in the column.

subscript · iOS 15.0+

subscript

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

Returns a slice of the column by selecting elements with a collection of Booleans. - Parameter mask: A collection of Booleans. The method selects the column's elements that correspond to the `true` elements in the collection.

subscript · iOS 15.0+

subscript

TypeScript
subscript36140(position: number): (unknown) | null
Swift declaration
subscript(position: Int) -> Any? { get set }

Accesses an element at an index. - Parameter position: A valid index in the column.

Skipped declarations

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

AnyColumn.decoded(_:using:)

Passing a Swift type itself is not supported.

AnyColumn.decode(_:using:)

Passing a Swift type itself is not supported.

AnyColumn.encoded(_:using:)

Passing a Swift type itself is not supported.

AnyColumn.encode(_:using:)

Passing a Swift type itself is not supported.

AnyColumn.wrappedElementType

Passing a Swift type itself is not supported.

AnyColumn.assumingType(_:)

Passing a Swift type itself is not supported.

All TabularData types →