Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Column<T>

A low-level wrapper for libcudf Column Objects

Type parameters

Hierarchy

  • Column

Index

Properties

Readonly data

data: DeviceBuffer

Readonly disposed

disposed: boolean

Readonly hasNulls

hasNulls: boolean

Readonly length

length: number

Readonly mask

mask: DeviceBuffer

Readonly nullCount

nullCount: number

Readonly nullable

nullable: boolean

Readonly numChildren

numChildren: number

Readonly offset

offset: number

Readonly type

type: T

Methods

abs

  • abs(memoryResource?: MemoryResource): Column<T>
  • Compute the absolute value for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

acos

  • acos(memoryResource?: MemoryResource): Column<T>
  • Compute the trigonometric cosine inverse for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

acosh

  • acosh(memoryResource?: MemoryResource): Column<T>
  • Compute the hyperbolic cosine inverse for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

add

all

  • all(memoryResource?: MemoryResource): boolean
  • Return whether all elements are true in column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns boolean

    true if all elements are true in column, else false.

any

  • any(memoryResource?: MemoryResource): boolean
  • Return whether any elements are true in column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns boolean

    true if any elements are true in column, else false.

applyBooleanMask

  • applyBooleanMask(selection: Column<Bool8>, memoryResource?: MemoryResource): Column<T>
  • Return sub-selection from a Column

    Parameters

    • selection: Column<Bool8>

      A Series of bools.

    • Optional memoryResource: MemoryResource

      An optional MemoryResource used to allocate the result's device memory.

    Returns Column<T>

asin

  • asin(memoryResource?: MemoryResource): Column<T>
  • Compute the trigonometric sine inverse for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

asinh

  • asinh(memoryResource?: MemoryResource): Column<T>
  • Compute the hyperbolic sine inverse for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

atan

  • atan(memoryResource?: MemoryResource): Column<T>
  • Compute the trigonometric tangent inverse for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

atan2

atanh

  • atanh(memoryResource?: MemoryResource): Column<T>
  • Compute the hyperbolic tangent inverse for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

bitInvert

  • bitInvert(memoryResource?: MemoryResource): Column<T>
  • Compute the bitwise not (~) for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

bitwiseAnd

  • bitwiseAnd(rhs: bigint, memoryResource?: MemoryResource): Column<T>
  • bitwiseAnd(rhs: number, memoryResource?: MemoryResource): Column<T>
  • bitwiseAnd<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • bitwiseAnd<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

bitwiseOr

  • bitwiseOr(rhs: bigint, memoryResource?: MemoryResource): Column<T>
  • bitwiseOr(rhs: number, memoryResource?: MemoryResource): Column<T>
  • bitwiseOr<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • bitwiseOr<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

bitwiseXor

  • bitwiseXor(rhs: bigint, memoryResource?: MemoryResource): Column<T>
  • bitwiseXor(rhs: number, memoryResource?: MemoryResource): Column<T>
  • bitwiseXor<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • bitwiseXor<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

boolsToMask

  • boolsToMask(memoryResource?: MemoryResource): [DeviceBuffer, number]
  • Compress the data from a Bool8 Column to bits and return a Buffer

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns [DeviceBuffer, number]

cast

  • cast<R>(dataType: R, memoryResource?: MemoryResource): Column<R>
  • Casts data from dtype specified in input to dtype specified in output.

    note

    Supports only fixed-width types.

    Type parameters

    Parameters

    • dataType: R
    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<R>

    Column of same size as input containing result of the cast operation.

cbrt

  • cbrt(memoryResource?: MemoryResource): Column<T>
  • Compute the cube-root (x^(1.0/3)) for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

ceil

  • ceil(memoryResource?: MemoryResource): Column<T>
  • Compute the smallest integer value not less than arg for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

concat

  • concat(other: Column<T>, memoryResource?: MemoryResource): Column<T>
  • Concat a Column to the end of the caller, returning a new Column.

    Parameters

    • other: Column<T>

      The Column to concat to the end of the caller.

    • Optional memoryResource: MemoryResource

    Returns Column<T>

containsRe

  • containsRe(pattern: string, memoryResource?: MemoryResource): Column<Bool8>
  • Creates a column of BOOL8 elements where true indicates the value is null and false indicates the row matches the given pattern

    Parameters

    • pattern: string

      Regex pattern to match to each string.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing null values.

copy

  • copy(memoryResource?: MemoryResource): Column<T>

cos

  • cos(memoryResource?: MemoryResource): Column<T>
  • Compute the trigonometric cosine for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

cosh

  • cosh(memoryResource?: MemoryResource): Column<T>
  • Compute the hyperbolic cosine for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

countBytes

  • countBytes(memoryResource?: MemoryResource): Column<Int32>
  • Returns the number of bytes of each string in the Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Int32>

    A column of INT32 counts

countCharacters

  • countCharacters(memoryResource?: MemoryResource): Column<Int32>
  • Returns the number of characters of each string in the Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Int32>

    A column of INT32 counts

countRe

  • countRe(pattern: string, memoryResource?: MemoryResource): Column<Int32>
  • Creates a column of INT32 elements where true indicates the number of times the given regex pattern matches in each string.

    Parameters

    • pattern: string

      Regex pattern to match to each string.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Int32>

    A non-nullable column of INT32 counts

cumulativeMax

  • cumulativeMax(memoryResource?: MemoryResource): Column<T>
  • Compute the cumulative max of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    The cumulative max of all the values in this Column.

cumulativeMin

  • cumulativeMin(memoryResource?: MemoryResource): Column<T>
  • Compute the cumulative min of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    The cumulative min of all the values in this Column.

cumulativeProduct

  • cumulativeProduct(memoryResource?: MemoryResource): Column<T>
  • Compute the cumulative product of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    The cumulative product of all the values in this Column.

cumulativeSum

  • cumulativeSum(memoryResource?: MemoryResource): Column<T>
  • Compute the cumulative sum of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    The cumulative sum of all the values in this Column.

dispose

  • dispose(): void

div

dropNans

  • dropNans(memoryResource?: MemoryResource): Column<T>
  • drop NA values from the column if column is of floating-type values and contains NA values

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns Column<T>

    column without NaN and Null values

dropNulls

  • dropNulls(memoryResource?: MemoryResource): Column<T>
  • drop NA values from the column if column is of floating-type values and contains NA values

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns Column<T>

    column without NaN and Null values

eq

  • eq(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • eq(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • eq<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • eq<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

exp

  • exp(memoryResource?: MemoryResource): Column<T>
  • Compute the exponential (base e, euler number) for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

fill

  • fill(value: Scalar<T>, begin?: number, end?: number, memoryResource?: MemoryResource): Column<T>
  • Fills a range of elements in a column out-of-place with a scalar value.

    Parameters

    • value: Scalar<T>

      The scalar value to fill.

    • Optional begin: number

      The starting index of the fill range (inclusive).

    • Optional end: number

      The index of the last element in the fill range (exclusive).

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

fillInPlace

  • fillInPlace(value: Scalar<T>, begin?: number, end?: number): Column<T>
  • Fills a range of elements in-place in a column with a scalar value.

    Parameters

    • value: Scalar<T>

      The scalar value to fill

    • Optional begin: number

      The starting index of the fill range (inclusive)

    • Optional end: number

      The index of the last element in the fill range (exclusive)

    Returns Column<T>

floor

  • floor(memoryResource?: MemoryResource): Column<T>
  • Compute the largest integer value not greater than arg for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

floorDiv

  • floorDiv(rhs: bigint, memoryResource?: MemoryResource): Column<Int64>
  • floorDiv(rhs: number, memoryResource?: MemoryResource): Column<Float64>
  • floorDiv<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • floorDiv<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

gather

  • gather(selection: Column<IndexType>, nullify_out_of_bounds: boolean, memoryResource?: MemoryResource): Column<T>
  • summary

    Return sub-selection from a Column.

    description

    Gathers the rows of the source columns according to selection, such that row "i" in the resulting Column's columns will contain row selection[i] from the source columns. The number of rows in the result column will be equal to the number of elements in selection. A negative value i in the selection is interpreted as i+n, where n is the number of rows in the source column.

    For dictionary columns, the keys column component is copied and not trimmed if the gather results in abandoned key elements.

    Parameters

    • selection: Column<IndexType>

      A Series of 8/16/32-bit signed or unsigned integer indices to gather.

    • nullify_out_of_bounds: boolean

      If true, coerce rows that corresponds to out-of-bounds indices in the selection to null. If false, skips all bounds checking for selection values. Pass false if you are certain that the selection contains only valid indices for better performance. If false and there are out-of-bounds indices in the selection, the behavior is undefined. Defaults to false.

    • Optional memoryResource: MemoryResource

      An optional MemoryResource used to allocate the result's device memory.

    Returns Column<T>

ge

  • ge(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • ge(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • ge<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • ge<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

getChild

  • getChild<R>(index: number): Column<R>

getJSONObject

  • getJSONObject(jsonPath?: string, opts?: GetJSONObjectOptions, memoryResource?: MemoryResource): Column<T>

getValue

  • getValue(index: number): null | T["scalarType"]

gt

  • gt(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • gt(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • gt<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • gt<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

hexFromIntegers

  • Returns a new strings column converting integer columns to hexadecimal characters.

    Any null entries will result in corresponding null entries in the output column.

    The output character set is '0'-'9' and 'A'-'F'. The output string width will be a multiple of 2 depending on the size of the integer type. A single leading zero is applied to the first non-zero output byte if it less than 0x10.

    Leading zeros are suppressed unless filling out a complete byte as in 1234 -> 04D2 instead of 000004D2 or 4D2.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A string Column with integers as strings.

hexToIntegers

  • hexToIntegers<R>(dataType: R, memoryResource?: MemoryResource): Column<R>
  • Returns a new integer numeric column parsing hexadecimal values from the provided strings column.

    Any null entries will result in corresponding null entries in the output column.

    Only characters [0-9] and [A-F] are recognized. When any other character is encountered, the parsing ends for that string. No interpretation is made on the sign of the integer.

    Overflow of the resulting integer type is not checked. Each string is converted using an int64 type and then cast to the target integer type before storing it into the output column. If the resulting integer type is too small to hold the value, the stored value will be undefined.

    Type parameters

    Parameters

    • dataType: R

      Type of integer numeric column to return.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<R>

    A Column of a the specified integral type with the results of the conversion.

ipv4FromIntegers

  • Converts integers into IPv4 addresses as strings.

    The IPv4 format is 1-3 character digits [0-9] between 3 dots (e.g. 123.45.67.890). Each section can have a value between [0-255].

    Each input integer is dissected into four integers by dividing the input into 8-bit sections. These sub-integers are then converted into [0-9] characters and placed between '.' characters.

    No checking is done on the input integer value. Only the lower 32-bits are used.

    Any null entries will result in corresponding null entries in the output column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A string Column with ipv4 addresses as strings.

ipv4ToIntegers

  • ipv4ToIntegers(memoryResource?: MemoryResource): Column<Int64>
  • Converts IPv4 addresses into integers.

    The IPv4 format is 1-3 character digits [0-9] between 3 dots (e.g. 123.45.67.890). Each section can have a value between [0-255].

    The four sets of digits are converted to integers and placed in 8-bit fields inside the resulting integer.

    i0.i1.i2.i3 -> (i0 << 24) | (i1 << 16) | (i2 << 8) | (i3)

    No checking is done on the format. If a string is not in IPv4 format, the resulting integer is undefined.

    The resulting 32-bit integer is placed in an int64_t to avoid setting the sign-bit in an int32_t type. This could be changed if cudf supported a UINT32 type in the future.

    Any null entries will result in corresponding null entries in the output column.Returns a new Int64 numeric column parsing hexadecimal values from the provided strings column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Int64>

    New INT64 column converted from strings.

isNaN

  • Creates a column of BOOL8 elements indicating the presence of NaN values in a column of floating point values. The output element at row i is true if the element in input at row i is NAN, else false

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing NAN values

isNotNaN

  • isNotNaN(memoryResource?: MemoryResource): Column<Bool8>
  • Creates a column of BOOL8 elements indicating the absence of NaN values in a column of floating point values. The output element at row i is false if the element in input at row i is NAN, else true

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing non-NAN values

isNull

  • Creates a column of BOOL8 elements where true indicates the value is null and false indicates the value is valid.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing null values.

isValid

  • isValid(memoryResource?: MemoryResource): Column<Bool8>
  • Creates a column of BOOL8 elements where true indicates the value is valid and false indicates the value is null.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with false representing null values.

le

  • le(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • le(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • le<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • le<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

log

  • log(memoryResource?: MemoryResource): Column<T>
  • Compute the natural logarithm (base e) for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

logBase

logicalAnd

  • logicalAnd(rhs: bigint, memoryResource?: MemoryResource): Column<Int64>
  • logicalAnd(rhs: number, memoryResource?: MemoryResource): Column<Float64>
  • logicalAnd<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • logicalAnd<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

logicalOr

  • logicalOr(rhs: bigint, memoryResource?: MemoryResource): Column<Int64>
  • logicalOr(rhs: number, memoryResource?: MemoryResource): Column<Float64>
  • logicalOr<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • logicalOr<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

lt

  • lt(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • lt(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • lt<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • lt<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

matchesRe

  • matchesRe(pattern: string, memoryResource?: MemoryResource): Column<Bool8>
  • Creates a column of BOOL8 elements where true indicates the value is null and false indicates the row matches the given pattern only at the beginning of the string

    Parameters

    • pattern: string

      Regex pattern to match to each string.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing null values.

max

  • max(memoryResource?: MemoryResource): T["scalarType"]
  • Compute the max of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns T["scalarType"]

    The max of all the values in this Column.

mean

  • mean(memoryResource?: MemoryResource): number
  • Compute the mean of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns number

    The mean of all the values in this Column.

median

  • median(memoryResource?: MemoryResource): T["scalarType"]
  • Compute the median of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns T["scalarType"]

    The median of all the values in this Column.

min

  • min(memoryResource?: MemoryResource): T["scalarType"]
  • Compute the min of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns T["scalarType"]

    The min of all the values in this Column.

minmax

  • minmax(memoryResource?: MemoryResource): [T["scalarType"], T["scalarType"]]
  • Compute a pair of [min,max] of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns [T["scalarType"], T["scalarType"]]

    The pair of [min,max] of all the values in this Column.

mod

mul

nansToNulls

  • nansToNulls(memoryResource?: MemoryResource): Column<T>
  • convert NaN values in the column with Null values, while also updating the nullMask and nullCount values

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns Column<T>

ne

  • ne(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • ne(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • ne<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • ne<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

not

  • Compute the logical not (!) for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A Column of the same number of elements containing the result of the operation.

nullEquals

  • nullEquals(rhs: bigint, memoryResource?: MemoryResource): Column<Bool8>
  • nullEquals(rhs: number, memoryResource?: MemoryResource): Column<Bool8>
  • nullEquals<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<Bool8>
  • nullEquals<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<Bool8>

nullMax

nullMin

nunique

  • nunique(dropna?: boolean, memoryResource?: MemoryResource): number
  • Compute the nunique of all values in this Column.

    Parameters

    • Optional dropna: boolean

      The dropna parameter if true, excludes nulls while computing nunique, if false, includes the nulls while computing nunique.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns number

    The number of unique values in this Column.

pad

  • Add padding to each string using a provided character.

    If the string is already width or more characters, no padding is performed. No strings are truncated.

    Null string entries result in null entries in the output column.

    Parameters

    • width: number

      The minimum number of characters for each string.

    • side: PadSideType

      Where to place the padding characters

    • fill_char: string

      Single UTF-8 character to use for padding.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    New column with padded strings.

partitionStrings

  • Returns a set of 3 columns by splitting each string using the specified delimiter.

    The number of rows in the output columns will be the same as the input column. The first column will contain the first tokens of each string as a result of the split. The second column will contain the delimiter. The third column will contain the remaining characters of each string after the delimiter.

    Any null string entries return corresponding null output columns.

    Parameters

    • delimiter: string

      UTF-8 encoded string indicating where to split each string. Default of empty string indicates split on whitespace.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns [Column<Utf8String>, Column<Utf8String>, Column<Utf8String>]

    3 new string columns representing before the delimiter, the delimiter, and after the delimiter.

pow

product

  • product(memoryResource?: MemoryResource): T extends Integral ? bigint : number
  • Compute the product of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns T extends Integral ? bigint : number

    The product of all the values in this Column.

quantile

  • quantile(q?: number, interpolation?: Interpolation, memoryResource?: MemoryResource): number
  • Return values at the given quantile.

    Parameters

    • Optional q: number

      the quantile(s) to compute, 0 <= q <= 1

    • Optional interpolation: Interpolation

      This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points i and j.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns number

    values at the given quantile.

replaceNaNs

  • replaceNaNs(value: Column<T>, memoryResource?: MemoryResource): Column<T>
  • replaceNaNs(value: Scalar<T>, memoryResource?: MemoryResource): Column<T>
  • Replace NaN values with a scalar value, or the corresponding elements from another Column.

    Parameters

    • value: Column<T>

      The value to use in place of NaNs.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

  • Parameters

    • value: Scalar<T>
    • Optional memoryResource: MemoryResource

    Returns Column<T>

replaceNulls

  • replaceNulls(value: Column<T>, memoryResource?: MemoryResource): Column<T>
  • replaceNulls(value: Scalar<T>, memoryResource?: MemoryResource): Column<T>
  • replaceNulls(value: boolean, memoryResource?: MemoryResource): Column<T>

replaceRe

  • replaceRe(pattern: string, replacement: string, maxReplaceCount: number, flags: { dotAll: boolean; multiline: boolean }, memoryResource?: MemoryResource): Column<Utf8String>
  • For each string in the column, replaces any character sequence matching the given pattern with the provided replacement string.

    Null string entries will return null output string entries.

    Position values are 0-based meaning position 0 is the first character of each string.

    This function can be used to insert a string into specific position by specifying the same position value for start and stop. The repl string can be appended to each string by specifying -1 for both start and stop.

    Parameters

    • pattern: string

      The regular expression pattern to search within each string.

    • replacement: string

      The string used to replace the matched sequence in each string. Default is an empty string.

    • maxReplaceCount: number

      The maximum number of times to replace the matched pattern within each string. Default replaces every substring that is matched.

    • flags: { dotAll: boolean; multiline: boolean }

      Regex flags for interpreting special characters in the pattern.

      • dotAll: boolean
      • multiline: boolean
    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    New strings column with matching elements replaced.

replaceSlice

  • replaceSlice(repl: string, start: number, stop: number, memoryResource?: MemoryResource): Column<Utf8String>
  • Replaces each string in the column with the provided repl string within the [start,stop) character position range.

    Null string entries will return null output string entries.

    Position values are 0-based meaning position 0 is the first character of each string.

    This function can be used to insert a string into specific position by specifying the same position value for start and stop. The repl string can be appended to each string by specifying -1 for both start and stop.

    Parameters

    • repl: string

      Replacement string for specified positions found.

    • start: number

      Start position where repl will be added. Default is 0, first character position.

    • stop: number

      End position (exclusive) to use for replacement. Default of -1 specifies the end of each string.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    New strings column

rint

  • rint(memoryResource?: MemoryResource): Column<T>
  • Round floating-point to integer for each value in this Column.

    throws

    Error if the Column's DataType isn't Float32 or Float64.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

setNullCount

  • setNullCount(nullCount: number): void

setNullMask

  • setNullMask(mask: MemoryData | ArrayLike<number> | ArrayLike<bigint>, nullCount?: number): void
  • Parameters

    • mask: MemoryData | ArrayLike<number> | ArrayLike<bigint>

      The null-mask. Valid values are marked as 1; otherwise 0. The mask bit given the data index idx is computed as:

      (mask[idx // 8] >> (idx % 8)) & 1
      
    • Optional nullCount: number

      The number of null values. If None, it is calculated automatically.

    Returns void

shiftLeft

  • shiftLeft(rhs: bigint, memoryResource?: MemoryResource): Column<T>
  • shiftLeft(rhs: number, memoryResource?: MemoryResource): Column<T>
  • shiftLeft<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • shiftLeft<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

shiftRight

  • shiftRight(rhs: bigint, memoryResource?: MemoryResource): Column<T>
  • shiftRight(rhs: number, memoryResource?: MemoryResource): Column<T>
  • shiftRight<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • shiftRight<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

shiftRightUnsigned

  • shiftRightUnsigned(rhs: bigint, memoryResource?: MemoryResource): Column<T>
  • shiftRightUnsigned(rhs: number, memoryResource?: MemoryResource): Column<T>
  • shiftRightUnsigned<R>(rhs: Scalar<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>
  • shiftRightUnsigned<R>(rhs: Column<R>, memoryResource?: MemoryResource): Column<CommonType<T, R>>

sin

  • sin(memoryResource?: MemoryResource): Column<T>
  • Compute the trigonometric sine for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

sinh

  • sinh(memoryResource?: MemoryResource): Column<T>
  • Compute the hyperbolic sine for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

split

  • Splits a string column by delimiter. The delimiter string will remain at the end of each string in the split column. This method will completely change the string boundaries of a string column according to the delimiter: old boundaries will be removed and new boundaries will be introduced according to the delimiter. In addition, if used without a delimiter, the string column will be combined from n string values into a single value.

    example
    let a = Series.new(['abcdefg', 'bcdefgh']);
    a.split('d');
    [ 'abcd', 'efgbcd', 'efgh' ]
    a.split('');
    [ 'abcdefgbcdefgh' ]

    Parameters

    • delimiter: string

      split along the delimiter.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    New strings column

sqrt

  • sqrt(memoryResource?: MemoryResource): Column<T>
  • Compute the square-root (x^0.5) for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

std

  • std(ddof?: number, memoryResource?: MemoryResource): number
  • Return sample standard deviation of the column. Normalized by N-1 by default. This can be changed using the ddof argument

    Parameters

    • Optional ddof: number

      Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns number

    The median of all the values in this column.

stringIsFloat

  • stringIsFloat(memoryResource?: MemoryResource): Column<Bool8>
  • Creates a column of BOOL8 elements indicating strings in which all characters are valid for conversion to floats.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing convertible values

stringIsHex

  • stringIsHex(memoryResource?: MemoryResource): Column<Bool8>
  • Returns a boolean column identifying strings in which all characters are valid for conversion to integers from hex.

    The output row entry will be set to true if the corresponding string element has at least one character in [0-9A-Za-z]. Also, the string may start with '0x'.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing convertible values

stringIsInteger

  • stringIsInteger(memoryResource?: MemoryResource): Column<Bool8>
  • Creates a column of BOOL8 elements indicating strings in which all characters are valid for conversion to floats.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing convertible values

stringIsIpv4

  • stringIsIpv4(memoryResource?: MemoryResource): Column<Bool8>
  • Returns a boolean column identifying strings in which all characters are valid for conversion to integers from IPv4 format.

    The output row entry will be set to true if the corresponding string element has the following format xxx.xxx.xxx.xxx where xxx is integer digits between 0-255.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A non-nullable column of BOOL8 elements with true representing convertible values

stringIsTimestamp

  • stringIsTimestamp(format: string, memoryResource?: MemoryResource): Column<Bool8>
  • Returns a new timestamp column converting a strings column into timestamps using the provided format pattern.

    The format pattern can include the following specifiers: "%Y,%y,%m,%d,%H,%I,%p,%M,%S,%f,%z".

    Parameters

    • format: string

      The string specifying output format. Default format is "%Y-%m-%dT%H:%M:%SZ".

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A Column of boolean type with the results of the conversion.

stringsFromBooleans

  • Returns a new strings column converting the boolean values from the provided column into strings.

    Any null entries will result in corresponding null entries in the output column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A string Column with booleans as strings.

stringsFromFloats

  • Returns a new strings column converting the float values from the provided column into strings.

    Any null entries will result in corresponding null entries in the output column.

    For each float, a string is created in base-10 decimal. Negative numbers will include a '-' prefix. Numbers producing more than 10 significant digits will produce a string that includes scientific notation (e.g. "-1.78e+15").

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A string Column with floats as strings.

stringsFromIntegers

  • Returns a new strings column converting the integer values from the provided column into strings.

    Any null entries will result in corresponding null entries in the output column.

    For each integer, a string is created in base-10 decimal. Negative numbers will include a '-' prefix.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A string Column with integers as strings.

stringsFromLists

  • Convert a list column of strings into a formatted strings column.

    The separators column should contain 3 strings elements in the following order:

    • element separator (default is comma ,)
    • left-hand enclosure (default is [)
    • right-hand enclosure (default is ])

    Parameters

    • na_rep: string

      Replacement string for null elements.

    • separators: Column<Utf8String>

      Strings to use for enclosing list components and separating elements.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A string Column with the lists as strings.

stringsFromTimestamps

  • stringsFromTimestamps(format: string, memoryResource?: MemoryResource): Column<Utf8String>
  • Returns a new strings column converting a timestamp column into strings using the provided format pattern.

    The format pattern can include the following specifiers: "%Y,%y,%m,%d,%H,%I,%p,%M,%S,%f,%z,%Z"

    Parameters

    • format: string

      The string specifying output format. Default format is "%Y-%m-%dT%H:%M:%SZ".

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    A Column of string type with the results of the conversion.

stringsToBooleans

  • stringsToBooleans(memoryResource?: MemoryResource): Column<Bool8>
  • Returns a new Bool8 column parsing true/false values from the provided strings column.

    Any null entries will result in corresponding null entries in the output column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Bool8>

    A Column of boolean type with the results of the conversion.

stringsToFloats

  • stringsToFloats<R>(dataType: R, memoryResource?: MemoryResource): Column<R>
  • Returns a new floating point numeric column parsing float values from the provided strings column.

    Any null entries will result in corresponding null entries in the output column.

    Only characters [0-9] plus a prefix '-' and '+' and decimal '.' are recognized. Additionally, scientific notation is also supported (e.g. "-1.78e+5").

    Type parameters

    Parameters

    • dataType: R

      Type of floating numeric column to return.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<R>

    A Column of a the specified float type with the results of the conversion.

stringsToIntegers

  • stringsToIntegers<R>(dataType: R, memoryResource?: MemoryResource): Column<R>
  • Returns a new integer numeric column parsing integer values from the provided strings column.

    Any null entries will result in corresponding null entries in the output column.

    Only characters [0-9] plus a prefix '-' and '+' are recognized. When any other character is encountered, the parsing ends for that string and the current digits are converted into an integer.

    Overflow of the resulting integer type is not checked. Each string is converted using an int64 type and then cast to the target integer type before storing it into the output column. If the resulting integer type is too small to hold the value, the stored value will be undefined.

    Type parameters

    Parameters

    • dataType: R

      Type of integer numeric column to return.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<R>

    A Column of a the specified integral type with the results of the conversion.

stringsToTimestamps

  • stringsToTimestamps<T>(type: T, format: string, memoryResource?: MemoryResource): Column<T>
  • Returns a new timestamp column converting a strings column into timestamps using the provided format pattern.

    The format pattern can include the following specifiers: "%Y,%y,%m,%d,%H,%I,%p,%M,%S,%f,%z".

    Type parameters

    Parameters

    • type: T

      The timestamp type used for creating the output column.

    • format: string

      String specifying the timestamp format in strings.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of timestamp type with the results of the conversion.

sub

sum

  • sum(memoryResource?: MemoryResource): T extends Integral ? bigint : number
  • Compute the sum of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns T extends Integral ? bigint : number

    The sum of all the values in this Column.

sumOfSquares

  • sumOfSquares(memoryResource?: MemoryResource): T extends Integral ? bigint : number
  • Compute the sumOfSquares of all values in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns T extends Integral ? bigint : number

    The sumOfSquares of all the values in this Column.

tan

  • tan(memoryResource?: MemoryResource): Column<T>
  • Compute the trigonometric tangent for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

tanh

  • tanh(memoryResource?: MemoryResource): Column<T>
  • Compute the hyperbolic tangent for each value in this Column.

    Parameters

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<T>

    A Column of the same number of elements containing the result of the operation.

trueDiv

var

  • var(ddof?: number, memoryResource?: MemoryResource): number
  • Return unbiased variance of the column. Normalized by N-1 by default. This can be changed using the ddof argument

    Parameters

    • Optional ddof: number

      Delta Degrees of Freedom. The divisor used in calculations is N - ddof, where N represents the number of elements.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result column's device memory.

    Returns number

    The median of all the values in this column.

zfill

  • Add '0' as padding to the left of each string.

    If the string is already width or more characters, no padding is performed. No strings are truncated.

    This equivalent to pad(width, 'left', '0') but is more optimized for this special case.

    Null string entries result in null entries in the output column.

    Parameters

    • width: number

      The minimum number of characters for each string.

    • Optional memoryResource: MemoryResource

      The optional MemoryResource used to allocate the result Column's device memory.

    Returns Column<Utf8String>

    New column of strings.