RAPIDS
    Preparing search index...

    Class Int64Series

    A Series of 64-bit signed integer values in GPU memory.

    Hierarchy

    • IntSeries<Int64>
      • Int64Series
    Index

    Accessors

    • get offset(): number

      The offset of elements in this Series underlying Column.

      Returns number

    Methods

    • Parameters

      • Optional_memoryResource: MemoryResource

      Returns TimestampDaySeries

    • Parameters

      • Optional_memoryResource: MemoryResource

      Returns TimestampMicrosecondSeries

    • Parameters

      • Optional_memoryResource: MemoryResource

      Returns TimestampMillisecondSeries

    • Parameters

      • Optional_memoryResource: MemoryResource

      Returns TimestampNanosecondSeries

    • Parameters

      • Optional_memoryResource: MemoryResource

      Returns TimestampSecondSeries

    • Compute the absolute value for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1, 2, -3, 4, 5]).abs(); // [1, 2, 3, 4, 5]
    • Compute the trigonometric cosine inverse for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).acos(); // [1.5707963267948966, NaN, 0]
    • Compute the hyperbolic cosine inverse for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([7, 56, 1]).acosh(); // [2.6339157938496336, 4.71841914237288, 0]
    • Add this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to add to this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.add(3); // [13, 15, 17, 23]
      a.add(b); // [13, 14, 15, 23]
    • Add this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to add to this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.add(3); // [13, 15, 17, 23]
      a.add(b); // [13, 14, 15, 23]
    • Add this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to add to this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.add(3); // [13, 15, 17, 23]
      a.add(b); // [13, 14, 15, 23]
    • Add this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to add to this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.add(3); // [13, 15, 17, 23]
      a.add(b); // [13, 14, 15, 23]
    • Return whether all elements are true in Series.

      Parameters

      • skipNulls: boolean = true

        bool Exclude null values. If the entire row/column is NA and skipNulls is true, then the result will be true, as for an empty row/column. If skipNulls is false, then NA are treated as true, because these are not equal to zero.

      • OptionalmemoryResource: MemoryResource

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

      Returns boolean

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

      import {Series} from '@rapidsai/cudf';
      //boolean series
      Series.new([true, false, true]).all() // false
      Series.new([true, true, true]).all() // true
    • Return whether any elements are true in Series.

      Parameters

      • skipNulls: boolean = true

        bool Exclude NA/null values. If the entire row/column is NA and skipNulls is true, then the result will be true, as for an empty row/column. If skipNulls is false, then NA are treated as true, because these are not equal to zero.

      • OptionalmemoryResource: MemoryResource

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

      Returns boolean

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

      import {Series} from '@rapidsai/cudf';

      //boolean series
      Series.new([false, false, false]).any() // false
      Series.new([true, false, true]).any() // true
    • Compute the trigonometric sine inverse for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).asin(); // [0, NaN, 1.5707963267948966]
    • Compute the hyperbolic sine inverse for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).asinh(); // [0, 4.49993310426429, 0.8813735870195429]
    • Compute the trigonometric tangent inverse for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).atan(); // [0, 1.5485777614681775, 0.7853981633974483]
    • Perform a binary atan2 operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.atan2(3);
      // [0.3217505543966422, 0.7853981633974483, 1.0303768265243125, 0, 1.1659045405098132]

      a.atan2(b);
      // [0.7853981633974483, 0.7853981633974483, 1.0303768265243125, 0, 0.6610431688506869]
    • Perform a binary atan2 operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.atan2(3);
      // [0.3217505543966422, 0.7853981633974483, 1.0303768265243125, 0, 1.1659045405098132]

      a.atan2(b);
      // [0.7853981633974483, 0.7853981633974483, 1.0303768265243125, 0, 0.6610431688506869]
    • Perform a binary atan2 operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.atan2(3);
      // [0.3217505543966422, 0.7853981633974483, 1.0303768265243125, 0, 1.1659045405098132]

      a.atan2(b);
      // [0.7853981633974483, 0.7853981633974483, 1.0303768265243125, 0, 0.6610431688506869]
    • Perform a binary atan2 operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.atan2(3);
      // [0.3217505543966422, 0.7853981633974483, 1.0303768265243125, 0, 1.1659045405098132]

      a.atan2(b);
      // [0.7853981633974483, 0.7853981633974483, 1.0303768265243125, 0, 0.6610431688506869]
    • Compute the hyperbolic tangent inverse for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, -0.5]).atanh(); // [0, -0.5493061443340549]
    • Compute the bitwise not (~) for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

        Memory resource used to allocate the result Series's device memory.

      Returns Int64Series

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

    • Perform a binary & operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary & operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary & operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary & operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary | operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary | operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary | operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary | operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary ^ operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary ^ operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary ^ operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary ^ operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Casts the values to a new dtype (similar to static_cast in C++).

      Type Parameters

      Parameters

      • dataType: R

        The new dtype.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<R>

      Series of same size as the current Series containing result of the cast operation.

      import {Series, Bool8, Int32} from '@rapidsai/cudf';

      const a = Series.new({type:new Int32, data: [1,0,1,0]});

      a.cast(new Bool8); // Bool8Series [true, false, true, false];
    • Compute the cube-root (x^(1.0/3)) for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1.2, 2.5]).cbrt(); // [-1.0626585691826111, 1.3572088082974534]
    • Compute the smallest integer value not less than arg for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1.2, 2.5, -3, 4.6, 5]).ceil(); // [-1, 3, -3, 5, 5]
    • Concat a Series to the end of the caller, returning a new Series of a common dtype.

      Type Parameters

      Parameters

      • other: R

        The Series to concat to the end of the caller.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      import {Series} from '@rapidsai/cudf';

      Series.new([1, 2, 3]).concat(Series.new([4, 5, 6])) // [1, 2, 3, 4, 5, 6]
    • Return a copy of this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      const a = Series.new(["foo", "bar", "test"]);

      a.copy() // StringSeries ["foo", "bar", "test"]
    • Compute the trigonometric cosine for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).cos(); // [1, 0.5253219888177297, 0.5403023058681398]
    • Compute the hyperbolic cosine for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).cosh(); // [1, 17467135528742547000, 1.5430806348152437]
    • Return the number of non-null elements in the Series.

      Returns number

      The number of non-null elements

      import {Series} from '@rapidsai/cudf';

      Series.new([1, 2, 3]).countNonNulls(); // 3
      Series.new([1, null, 3]).countNonNulls(); // 2
    • Compute the cumulative max of all values in this Series.

      Parameters

      • skipNulls: boolean = true

        The optional skipNulls if true drops NA and null values before computing reduction, else if skipNulls is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      The cumulative max of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32)

      a.cumulativeMax() // {4, 4, 5, 5, 5}
    • Compute the cumulative min of all values in this Series.

      Parameters

      • skipNulls: boolean = true

        The optional skipNulls if true drops NA and null values before computing reduction, else if skipNulls is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      The cumulative min of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32)

      a.cumulativeMin() // {4, 2, 2, 1, 1}
    • Compute the cumulative product of all values in this Series.

      Parameters

      • skipNulls: boolean = true

        The optional skipNulls if true drops NA and null values before computing reduction, else if skipNulls is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      The cumulative product of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32)

      a.cumulativeProduct() // {4, 8, 40, 40, 40}
    • Compute the cumulative sum of all values in this Series.

      Parameters

      • skipNulls: boolean = true

        The optional skipNulls if true drops NA and null values before computing reduction, else if skipNulls is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      The cumulative sum of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([4, 2, 5, 1, 1]).cast(new Int32)

      a.cumulativeSum() // {4, 6, 11, 12, 13}
    • Divide this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.div(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.div(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • Divide this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.div(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.div(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • Divide this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.div(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.div(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • Divide this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.div(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.div(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • Returns a new Series with duplicate values from the original removed

      Parameters

      • keep: boolean = true

        Determines whether or not to keep the duplicate items.

      • nullsEqual: boolean = true

        Determines whether nulls are handled as equal values.

      • nullsFirst: boolean = true

        Determines whether null values are inserted before or after non-null values.

      • OptionalmemoryResource: MemoryResource

        Memory resource used to allocate the result Column's device memory.

      Returns Int64Series

      series without duplicate values

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([4, null, 1, 2, null, 3, 4]).dropDuplicates(
      true,
      true,
      true
      ) // [null, 1, 2, 3, 4]

      Series.new([4, null, 1, 2, null, 3, 4]).dropDuplicates(
      false,
      true,
      true
      ) // [1, 2, 3]
    • drop Null values from the series

      Parameters

      • OptionalmemoryResource: MemoryResource

        Memory resource used to allocate the result Column's device memory.

      Returns Int64Series

      series without Null values

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, undefined, 3]).dropNulls() // [1, 3]
      Series.new([1, null, 3]).dropNulls() // [1, 3]
      Series.new([1, , 3]).dropNulls() // [1, 3]

      // StringSeries
      Series.new(["foo", "bar", undefined]).dropNulls() // ["foo", "bar"]
      Series.new(["foo", "bar", null]).dropNulls() // ["foo", "bar"]
      Series.new(["foo", "bar", ,]).dropNulls() // ["foo", "bar"]

      // Bool8Series
      Series.new([true, true, undefined]).dropNulls() // [true, true]
      Series.new([true, true, null]).dropNulls() // [true, true]
      Series.new([true, true, ,]).dropNulls() // [true, true]
    • Encode the Series values into integer labels.

      Type Parameters

      Parameters

      • categories: Int64Series = ...

        The optional Series of values to encode into integers. Defaults to the unique elements in this Series.

      • type: R = ...

        The optional integer DataType to use for the returned Series. Defaults to Int32.

      • nullSentinel: R["scalarType"] = -1

        The optional value used to indicate missing category. Defaults to -1.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<R>

      A sequence of encoded integer labels with values between 0 and n-1 categories, and nullSentinel for any null values

    • Perform the binary '==' operation between this column and another Series or scalar value.

      Parameters

      • rhs: bigint
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.eq(1); // [ false, true, false, false ]
      a.eq(b); // [ false, false, false, true ]
    • Perform the binary '==' operation between this column and another Series or scalar value.

      Parameters

      • rhs: number
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.eq(1); // [ false, true, false, false ]
      a.eq(b); // [ false, false, false, true ]
    • Perform the binary '==' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.eq(1); // [ false, true, false, false ]
      a.eq(b); // [ false, false, false, true ]
    • Perform the binary '==' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.eq(1); // [ false, true, false, false ]
      a.eq(b); // [ false, false, false, true ]
    • Compute the exponential (base e, euler number) for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1.2, 2.5]).exp(); // [0.30119421191220214, 12.182493960703473]
    • Fills a range of elements in a column out-of-place with a scalar value.

      Parameters

      • value: bigint

        The scalar value to fill.

      • begin: number = 0

        The starting index of the fill range (inclusive).

      • end: number = ...

        The index of the last element in the fill range (exclusive), default this.length .

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, 2, 3]).fill(0) // [0, 0, 0]
      // StringSeries
      Series.new(["foo", "bar", "test"]).fill("rplc", 0, 1) // ["rplc", "bar", "test"]
      // Bool8Series
      Series.new([true, true, true]).fill(false, 1) // [true, false, false]
    • Fills a range of elements in-place in a column with a scalar value.

      Parameters

      • value: bigint

        The scalar value to fill

      • begin: number = 0

        The starting index of the fill range (inclusive)

      • end: number = ...

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, 2, 3]).fillInPlace(0) // [0, 0, 0]
      // StringSeries
      Series.new(["foo", "bar", "test"]).fillInPlace("rplc", 0, 1) // ["rplc", "bar", "test"]
      // Bool8Series
      Series.new([true, true, true]).fillInPlace(false, 1) // [true, false, false]
    • Return a sub-selection of this Series using the specified boolean mask.

      Parameters

      • mask: Bool8Series

        A Series of boolean values for whose corresponding element in this Series will be selected or ignored.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from "@rapidsai/cudf";
      const mask = Series.new([true, false, true]);

      // Float64Series
      Series.new([1, 2, 3]).filter(mask) // [1, 3]
      // StringSeries
      Series.new(["foo", "bar", "test"]).filter(mask) // ["foo", "test"]
      // Bool8Series
      Series.new([false, true, true]).filter(mask) // [false, true]
    • Compute the largest integer value not greater than arg for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1.2, 2.5, -3, 4.6, 5]).floor(); // [-2, 2, -3, 4, 5]
    • Floor-divide this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to floor-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.floorDiv(3); // [ 3, 4, 4, 6 ]
      a.floorDiv(b); // [ 3, 6, 14, 6 ]
    • Floor-divide this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to floor-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.floorDiv(3); // [ 3, 4, 4, 6 ]
      a.floorDiv(b); // [ 3, 6, 14, 6 ]
    • Floor-divide this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to floor-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.floorDiv(3); // [ 3, 4, 4, 6 ]
      a.floorDiv(b); // [ 3, 6, 14, 6 ]
    • Floor-divide this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to floor-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.floorDiv(3); // [ 3, 4, 4, 6 ]
      a.floorDiv(b); // [ 3, 6, 14, 6 ]
    • Parameters

      • indices: number[] | Series<IndexType>

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

      • nullify_out_of_bounds: boolean = false

        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.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      Gathers the rows of the source columns according to selection, such that row "i" in the resulting Series's columns will contain row selection[i] from the source columns. The number of rows in the result series 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 series.

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

      import {Series, Int32} from '@rapidsai/cudf';

      const a = Series.new([1,2,3]);
      const b = Series.new(["foo", "bar", "test"]);
      const c = Series.new([true, false, true]);
      const selection = Series.new({type: new Int32, data: [0,2]});

      a.gather(selection) // Float64Series [1,3]
      b.gather(selection) // StringSeries ["foo", "test"]
      c.gather(selection) // Bool8Series [true, true]
    • Perform the binary '>=' operation between this column and another Series or scalar value.

      Parameters

      • rhs: bigint
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ge(1); // [false, true, true, true]
      a.ge(b); // [false, false, true, true]
    • Perform the binary '>=' operation between this column and another Series or scalar value.

      Parameters

      • rhs: number
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ge(1); // [false, true, true, true]
      a.ge(b); // [false, false, true, true]
    • Perform the binary '>=' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ge(1); // [false, true, true, true]
      a.ge(b); // [false, false, true, true]
    • Perform the binary '>=' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ge(1); // [false, true, true, true]
      a.ge(b); // [false, false, true, true]
    • Return a value at the specified index to host memory

      Parameters

      • index: number

        the index in this Series to return a value for

      Returns bigint | null

      import {Series} from "@rapidsai/cudf";

      // Float64Series
      Series.new([1, 2, 3]).getValue(0) // 1
      Series.new([1, 2, 3]).getValue(2) // 3
      Series.new([1, 2, 3]).getValue(3) // throws index out of bounds error
    • Perform the binary '>' operation between this column and another Series or scalar value.

      Parameters

      • rhs: bigint
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.gt(1); // [false, false, true, true]
      a.gt(b); // [false, false, true, false]
    • Perform the binary '>' operation between this column and another Series or scalar value.

      Parameters

      • rhs: number
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.gt(1); // [false, false, true, true]
      a.gt(b); // [false, false, true, false]
    • Perform the binary '>' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.gt(1); // [false, false, true, true]
      a.gt(b); // [false, false, true, false]
    • Perform the binary '>' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.gt(1); // [false, false, true, true]
      a.gt(b); // [false, false, true, false]
    • Returns the first n rows.

      Parameters

      • n: number = 5

        The number of rows to return.

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      const a = Series.new([4, 6, 8, 10, 12, 1, 2]);
      const b = Series.new(["foo", "bar", "test"]);

      a.head(); // [4, 6, 8, 10, 12]
      b.head(1); // ["foo"]
      a.head(-1); // throws index out of bounds error
    • Creates a Series of BOOL8 elements where true indicates the value is valid and false indicates the value is null.

      Parameters

      • OptionalmemoryResource: MemoryResource

        Memory resource used to allocate the result Column's device memory.

      Returns Bool8Series

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

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, null, 3]).isNotNull() // [true, false, true]
      // StringSeries
      Series.new(["foo", "bar", null]).isNotNull() // [true, true, false]
      // Bool8Series
      Series.new([true, true, null]).isNotNull() // [true, true, false]
    • Creates a Series of BOOL8 elements where true indicates the value is null and false indicates the value is valid.

      Parameters

      • OptionalmemoryResource: MemoryResource

        Memory resource used to allocate the result Column's device memory.

      Returns Bool8Series

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

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, null, 3]).isNull() // [false, true, false]
      // StringSeries
      Series.new(["foo", "bar", null]).isNull() // [false, false, true]
      // Bool8Series
      Series.new([true, true, null]).isNull() // [false, false, true]
    • Return Fisher’s unbiased kurtosis of a sample. Kurtosis obtained using Fisher’s definition of kurtosis (kurtosis of normal == 0.0). Normalized by N-1.

      Parameters

      • skipNulls: boolean = true

        Exclude NA/null values. If an entire row/column is NA, the result will be NA.

      Returns number

      The unbiased kurtosis of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 2, 3, 4]);

      a.kurtosis() // -1.1999999999999904
    • Perform the binary '<=' operation between this column and another Series or scalar value.

      Parameters

      • rhs: bigint
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.le(1); // [true, true, false, false]
      a.le(b); // [true, true, false, true]
    • Perform the binary '<=' operation between this column and another Series or scalar value.

      Parameters

      • rhs: number
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.le(1); // [true, true, false, false]
      a.le(b); // [true, true, false, true]
    • Perform the binary '<=' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.le(1); // [true, true, false, false]
      a.le(b); // [true, true, false, true]
    • Perform the binary '<=' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.le(1); // [true, true, false, false]
      a.le(b); // [true, true, false, true]
    • Compute the natural logarithm (base e) for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1.2, 2.5, 4]).log(); // [NaN, 0.9162907318741551, 1.3862943611198906]
    • Perform a binary logBase operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 10, 100]);
      const b = Series.new([2, 10, 20]);

      a.logBase(10); // [0, 1, 2]
      a.logBase(b); // [0, 1, 1.537243573680482]
    • Perform a binary logBase operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 10, 100]);
      const b = Series.new([2, 10, 20]);

      a.logBase(10); // [0, 1, 2]
      a.logBase(b); // [0, 1, 1.537243573680482]
    • Perform a binary logBase operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 10, 100]);
      const b = Series.new([2, 10, 20]);

      a.logBase(10); // [0, 1, 2]
      a.logBase(b); // [0, 1, 1.537243573680482]
    • Perform a binary logBase operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 10, 100]);
      const b = Series.new([2, 10, 20]);

      a.logBase(10); // [0, 1, 2]
      a.logBase(b); // [0, 1, 1.537243573680482]
    • Perform a binary && operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalAnd(0); // Float64Series [ 0, 0, 0, 0 ]
      a.logicalAnd(0).view(new Bool8); // Bool8Series [ false, false, false, false ]
      a.logicalAnd(b); // [false, false, false, false]
    • Perform a binary && operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalAnd(0); // Float64Series [ 0, 0, 0, 0 ]
      a.logicalAnd(0).view(new Bool8); // Bool8Series [ false, false, false, false ]
      a.logicalAnd(b); // [false, false, false, false]
    • Perform a binary && operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalAnd(0); // Float64Series [ 0, 0, 0, 0 ]
      a.logicalAnd(0).view(new Bool8); // Bool8Series [ false, false, false, false ]
      a.logicalAnd(b); // [false, false, false, false]
    • Perform a binary && operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalAnd(0); // Float64Series [ 0, 0, 0, 0 ]
      a.logicalAnd(0).view(new Bool8); // Bool8Series [ false, false, false, false ]
      a.logicalAnd(b); // [false, false, false, false]
    • Perform a binary || operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalOr(0); // Float64Series [ 0, 1, 1, 0 ]
      a.logicalOr(0).cast(new Bool8); // Bool8Series [ false, true, true, false ]
      a.logicalOr(b); // [false, true, true, false]
    • Perform a binary || operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalOr(0); // Float64Series [ 0, 1, 1, 0 ]
      a.logicalOr(0).cast(new Bool8); // Bool8Series [ false, true, true, false ]
      a.logicalOr(b); // [false, true, true, false]
    • Perform a binary || operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalOr(0); // Float64Series [ 0, 1, 1, 0 ]
      a.logicalOr(0).cast(new Bool8); // Bool8Series [ false, true, true, false ]
      a.logicalOr(b); // [false, true, true, false]
    • Perform a binary || operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series, Bool8} from '@rapidsai/cudf';
      const a = Series.new([false, true, true, false]);
      const b = Series.new([false, false, false, false]);

      a.logicalOr(0); // Float64Series [ 0, 1, 1, 0 ]
      a.logicalOr(0).cast(new Bool8); // Bool8Series [ false, true, true, false ]
      a.logicalOr(b); // [false, true, true, false]
    • Perform the binary '<' operation between this column and another Series or scalar value.

      Parameters

      • rhs: bigint
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.lt(1); // [true, false, false, false]
      a.lt(b); // [true, true, false, false]
    • Perform the binary '<' operation between this column and another Series or scalar value.

      Parameters

      • rhs: number
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.lt(1); // [true, false, false, false]
      a.lt(b); // [true, true, false, false]
    • Perform the binary '<' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.lt(1); // [true, false, false, false]
      a.lt(b); // [true, true, false, false]
    • Perform the binary '<' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.lt(1); // [true, false, false, false]
      a.lt(b); // [true, true, false, false]
    • Parameters

      • skipNulls: boolean = true
      • OptionalmemoryResource: MemoryResource

      Returns bigint

    • Compute the mean of all values in this Series.

      Parameters

      • skipNulls: boolean = true

        The optional skipNulls if true drops NA and null values before computing reduction, else if skipNulls is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns number

      The mean of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([5, 4, 1, 1, 1])

      a.mean() // 2.4
    • Compute the median of all values in this Series.

      Parameters

      • skipNulls: boolean = true

        The optional skipNulls if true drops NA and null values before computing reduction, else if skipNulls is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns number | bigint | boolean

      The median of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([5, 4, 1, 1, 1])

      a.median() // 1
    • Parameters

      • skipNulls: boolean = true
      • OptionalmemoryResource: MemoryResource

      Returns bigint

    • Parameters

      • skipNulls: boolean = true
      • OptionalmemoryResource: MemoryResource

      Returns [bigint, bigint]

    • Modulo this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to mod with this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mod(3); // [ 1, 0, 2, 2 ]
      a.mod(b); // [ 1, 0, 0, 2 ]
    • Modulo this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to mod with this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mod(3); // [ 1, 0, 2, 2 ]
      a.mod(b); // [ 1, 0, 0, 2 ]
    • Modulo this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to mod with this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mod(3); // [ 1, 0, 2, 2 ]
      a.mod(b); // [ 1, 0, 0, 2 ]
    • Modulo this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to mod with this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mod(3); // [ 1, 0, 2, 2 ]
      a.mod(b); // [ 1, 0, 0, 2 ]
    • Multiply this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to multiply this column by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mul(3); // [30, 36, 42, 60]
      a.mul(b); // [30, 24, 14, 60]
    • Multiply this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to multiply this column by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mul(3); // [30, 36, 42, 60]
      a.mul(b); // [30, 24, 14, 60]
    • Multiply this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to multiply this column by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mul(3); // [30, 36, 42, 60]
      a.mul(b); // [30, 24, 14, 60]
    • Multiply this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to multiply this column by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.mul(3); // [30, 36, 42, 60]
      a.mul(b); // [30, 24, 14, 60]
    • Perform the binary '!=' operation between this column and another Series or scalar value.

      Parameters

      • rhs: bigint
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ne(1); // [true, false, true, true]
      a.ne(b); // [true, true, true, false]
    • Perform the binary '!=' operation between this column and another Series or scalar value.

      Parameters

      • rhs: number
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ne(1); // [true, false, true, true]
      a.ne(b); // [true, true, true, false]
    • Perform the binary '!=' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ne(1); // [true, false, true, true]
      a.ne(b); // [true, true, true, false]
    • Perform the binary '!=' operation between this column and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R
      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of booleans with the comparison result.

      The other Series or scalar to compare with this column.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.ne(1); // [true, false, true, true]
      a.ne(b); // [true, true, true, false]
    • Returns the n largest element(s).

      Parameters

      • n: number = 5

        The number of values to retrieve.

      • keep: "none" | "any" | "first" | "last" = 'first'

        Determines whether to keep the first or last of any duplicate values.

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      const a = Series.new([4, 6, 8, 10, 12, 1, 2]);
      const b = Series.new(["foo", "bar", "test"]);

      a.nLargest(); // [12, 10, 8, 6, 4]
      b.nLargest(1); // ["test"]
      a.nLargest(-1); // []
    • Compute the logical not (!) for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

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

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([true, false, true, true, false])
      const b = Series.new([0, 1, 2, 3, 4])

      a.not() // [false, true, false, false, true]
      b.not()
    • Returns the n smallest element(s).

      Parameters

      • n: number = 5

        The number of values to retrieve.

      • keep: "none" | "any" | "first" | "last" = 'first'

        Determines whether to keep the first or last of any duplicate values.

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      const a = Series.new([4, 6, 8, 10, 12, 1, 2]);
      const b = Series.new(["foo", "bar", "test"]);

      a.nSmallest(); // [1, 2, 4, 6, 8]
      b.nSmallest(1); // ["bar"]
      a.nSmallest(-1); // []
    • Perform a binary nullEquals operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.nullEquals(3); // [false, true, false, false, false]
      a.nullEquals(b); // [true, true, false, true, false]
    • Perform a binary nullEquals operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.nullEquals(3); // [false, true, false, false, false]
      a.nullEquals(b); // [true, true, false, true, false]
    • Perform a binary nullEquals operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.nullEquals(3); // [false, true, false, false, false]
      a.nullEquals(b); // [true, true, false, true, false]
    • Perform a binary nullEquals operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Bool8Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([1, 3, 3, null, 9]);

      a.nullEquals(3); // [false, true, false, false, false]
      a.nullEquals(b); // [true, true, false, true, false]
    • Perform a binary nullMax operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([6, 6, 6, 6, 6]);

      a.nullMax(4); // [4, 4, 5, 4, 7]
      a.nullMax(b); // [6, 6, 6, 6, 7]
    • Perform a binary nullMax operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([6, 6, 6, 6, 6]);

      a.nullMax(4); // [4, 4, 5, 4, 7]
      a.nullMax(b); // [6, 6, 6, 6, 7]
    • Perform a binary nullMax operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([6, 6, 6, 6, 6]);

      a.nullMax(4); // [4, 4, 5, 4, 7]
      a.nullMax(b); // [6, 6, 6, 6, 7]
    • Perform a binary nullMax operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const b = Series.new([6, 6, 6, 6, 6]);

      a.nullMax(4); // [4, 4, 5, 4, 7]
      a.nullMax(b); // [6, 6, 6, 6, 7]
    • Perform a binary nullMin operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const c = Series.new([6, 6, 6, 6, 6]);

      a.nullMin(4); // [1, 3, 4, 4, 4]
      a.nullMin(b); // [1, 3, 5, 6, 6]
    • Perform a binary nullMin operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const c = Series.new([6, 6, 6, 6, 6]);

      a.nullMin(4); // [1, 3, 4, 4, 4]
      a.nullMin(b); // [1, 3, 5, 6, 6]
    • Perform a binary nullMin operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const c = Series.new([6, 6, 6, 6, 6]);

      a.nullMin(4); // [1, 3, 4, 4, 4]
      a.nullMin(b); // [1, 3, 5, 6, 6]
    • Perform a binary nullMin operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 3, 5, null, 7]);
      const c = Series.new([6, 6, 6, 6, 6]);

      a.nullMin(4); // [1, 3, 4, 4, 4]
      a.nullMin(b); // [1, 3, 5, 6, 6]
    • Compute the nunique of all values in this Series.

      Parameters

      • dropna: boolean = true

        The optional dropna if true drops NA and null values before computing reduction, else if dropna is false, reduction is computed directly.

      • OptionalmemoryResource: MemoryResource

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

      Returns number

      The number of unqiue values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 2, 3, 4, 4, 5, null, null]);

      a.nunique() // 5
      a.nunique(false) // 6
    • Generate an ordering that sorts the Series in a specified way.

      Parameters

      • ascending: boolean = true

        whether to sort ascending (true) or descending (false)

      • null_order: "after" | "before" = 'after'

        whether nulls should sort before or after other values

      • OptionalmemoryResource: MemoryResource

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

      Returns Int32Series

      Series containting the permutation indices for the desired sort order

      import {Series, NullOrder} from '@rapidsai/cudf';

      // Float64Series
      Series.new([50, 40, 30, 20, 10, 0]).orderBy(false) // [0, 1, 2, 3, 4, 5]
      Series.new([50, 40, 30, 20, 10, 0]).orderBy(true) // [5, 4, 3, 2, 1, 0]

      // StringSeries
      Series.new(["a", "b", "c", "d", "e"]).orderBy(false) // [4, 3, 2, 1, 0]
      Series.new(["a", "b", "c", "d", "e"]).orderBy(true) // [0, 1, 2, 3, 4]

      // Bool8Series
      Series.new([true, false, true, true, false]).orderBy(true) // [1, 4, 0, 2, 3]
      Series.new([true, false, true, true, false]).orderBy(false) // [0, 2, 3, 1, 4]

      // NullOrder usage
      Series.new([50, 40, 30, 20, 10, null]).orderBy(false, 'before') // [0, 1, 2, 3, 4, 5]
      Series.new([50, 40, 30, 20, 10, null]).orderBy(false, 'after') // [5, 0, 1, 2, 3, 4]
    • Power this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use as the exponent for the power operation.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.pow(2); // [ 0, 1, 4, 9 ]
      a.pow(b); // [ 0, 1, 2, 27 ]
    • Power this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use as the exponent for the power operation.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.pow(2); // [ 0, 1, 4, 9 ]
      a.pow(b); // [ 0, 1, 2, 27 ]
    • Power this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use as the exponent for the power operation.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.pow(2); // [ 0, 1, 4, 9 ]
      a.pow(b); // [ 0, 1, 2, 27 ]
    • Power this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use as the exponent for the power operation.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([0, 1, 2, 3]);
      const b = Series.new([3, 2, 1, 3]);

      a.pow(2); // [ 0, 1, 4, 9 ]
      a.pow(b); // [ 0, 1, 2, 27 ]
    • Parameters

      • skipNulls: boolean = true
      • OptionalmemoryResource: MemoryResource

      Returns bigint

    • Return values at the given quantile.

      Parameters

      • q: number = 0.5

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

      • interpolation: "linear" | "lower" | "higher" | "midpoint" | "nearest" = 'linear'

        This optional parameter specifies the interpolation method to use, when the desired quantile lies between two data points i and j. Valid values: ’linear’, ‘lower’, ‘higher’, ‘midpoint’, ‘nearest’.

      • OptionalmemoryResource: MemoryResource

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

      Returns number

      values at the given quantile.

      import {Series} from '@rapidsai/cudf';

      const a = Series.new([1, 2, 3, 4, 5])

      a.quantile(0.3, "linear") // 2.2
      a.quantile(0.3, "lower") // 2
      a.quantile(0.3, "higher") // 3
      a.quantile(0.3, "midpoint") // 2.5
      a.quantile(0.3, "nearest") // 2
    • Replace null values with a scalar value.

      Parameters

      • value: any

        The scalar value to use in place of nulls.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, null, 3]).replaceNulls(-1) // [1, -1, 3]
      // StringSeries
      Series.new(["foo", "bar", null]).replaceNulls("rplc") // ["foo", "bar", "rplc"]
      // Bool8Series
      Series.new([null, true, true]).replaceNulls(false) // [true, true, true]
    • Replace null values with the corresponding elements from another Series.

      Parameters

      • value: Int64Series

        The Series to use in place of nulls.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';
      const replace = Series.new([10, 10, 10]);
      const replaceBool = Series.new([false, false, false]);

      // Float64Series
      Series.new([1, null, 3]).replaceNulls(replace) // [1, 10, 3]
      // StringSeries
      Series.new(["foo", "bar", null]).replaceNulls(replace) // ["foo", "bar", "10"]
      // Bool8Series
      Series.new([null, true, true]).replaceNulls(replaceBool) // [false, true, true]
    • Replace null values with the non-null value following the null value in the same series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, null, 3]).replaceNullsFollowing() // [1, 3, 3]
      // StringSeries
      Series.new(["foo", "bar", null]).replaceNullsFollowing() // ["foo", "bar", null]
      Series.new(["foo", null, "bar"]).replaceNullsFollowing() // ["foo", "bar", "bar"]
      // Bool8Series
      Series.new([null, true, true]).replaceNullsFollowing() // [true, true, true]
    • Replace null values with the non-null value preceding the null value in the same series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, null, 3]).replaceNullsPreceding() // [1, 1, 3]
      // StringSeries
      Series.new([null, "foo", "bar"]).replaceNullsPreceding() // [null, "foo", "bar"]
      Series.new(["foo", null, "bar"]).replaceNullsPreceding() // ["foo", "foo", "bar"]
      // Bool8Series
      Series.new([true, null, false]).replaceNullsPreceding() // [true, true, false]
    • Returns a new series with reversed elements.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([1, 2, 3]).reverse() // [3, 2, 1]
      // StringSeries
      Series.new(["foo", "bar"]).reverse() // ["bar", "foo"]
      // Bool8Series
      Series.new([false, true]).reverse() // [true, false]
    • Scatters single value into this Series according to provided indices.

      Parameters

      • value: bigint

        A column of values to be scattered in to this Series

      • indices: number[] | Series<IndexType>

        A column of integral indices that indicate the rows in the this Series to be replaced by value.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series, Int32} from '@rapidsai/cudf';
      const a = Series.new({type: new Int32, data: [0, 1, 2, 3, 4]});
      const indices = Series.new({type: new Int32, data: [2, 4]});
      const indices_out_of_bounds = Series.new({type: new Int32, data: [5, 6]});

      a.scatter(-1, indices); // returns [0, 1, -1, 3, -1];
      a.scatter(-1, indices_out_of_bounds, true) // throws index out of bounds error
    • Scatters a column of values into this Series according to provided indices.

      Parameters

      • values: Int64Series
      • indices: number[] | Series<IndexType>

        A column of integral indices that indicate the rows in the this Series to be replaced by value.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      import {Series, Int32} from '@rapidsai/cudf';
      const a = Series.new({type: new Int32, data: [0, 1, 2, 3, 4]});
      const b = Series.new({type: new Int32, data: [200, 400]});
      const indices = Series.new({type: new Int32, data: [2, 4]});
      const indices_out_of_bounds = Series.new({type: new Int32, data: [5, 6]});

      a.scatter(b, indices); // returns [0, 1, 200, 3, 400];
      a.scatter(b, indices_out_of_bounds, true) // throws index out of bounds error
    • Parameters

      • mask: ArrayLike<number> | MemoryData | 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
        
      • OptionalnullCount: number

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

      Returns void

    • set value at the specified index

      Parameters

      • index: number

        the index in this Series to set a value for

      • value: bigint

        the value to set at index

      Returns void

      import {Series} from "@rapidsai/cudf";

      // Float64Series
      const a = Series.new([1, 2, 3]);
      a.setValue(0, -1) // inplace update -> Series([-1, 2, 3])
    • set values at the specified indices

      Parameters

      • indices: number[] | Int32Series

        the indices in this Series to set values for

      • values: bigint | Int64Series

        the values to set at Series of indices

      Returns void

      import {Series, Int32} from '@rapidsai/cudf';
      const a = Series.new({type: new Int32, data: [0, 1, 2, 3, 4]});
      const values = Series.new({type: new Int32, data: [200, 400]});
      const indices = Series.new({type: new Int32, data: [2, 4]});

      a.setValues(indices, values); // inplace update [0, 1, 200, 3, 400];
      a.setValues(indices, -1); // inplace update [0, 1, -1, 3, -1];
    • Perform a binary << operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary << operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary << operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary << operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary >> operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary >> operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary >> operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary >> operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary shiftRightUnsigned operation between this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary shiftRightUnsigned operation between this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary shiftRightUnsigned operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Perform a binary shiftRightUnsigned operation between this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to use.

      • OptionalmemoryResource: MemoryResource

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

    • Compute the trigonometric sine for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).sin(); // [0, 0.8509035245341184, 0.8414709848078965]
    • Compute the hyperbolic sine for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).sinh(); // [0, 17467135528742547000, 1.1752011936438014]
    • Return unbiased Fisher-Pearson skew of a sample.

      Parameters

      • skipNulls: boolean = true

        Exclude NA/null values. If an entire row/column is NA, the result will be NA.

      Returns number

      The unbiased skew of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 2, 3, 4, 5, 6, 6]);

      a.skew() // -0.288195490292614
    • Generate a new Series that is sorted in a specified way.

      Parameters

      • ascending: boolean = true

        whether to sort ascending (true) or descending (false) Default: true

      • null_order: "after" | "before" = 'after'

        whether nulls should sort before or after other values Default: before

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      Sorted values

      import {Series, NullOrder} from '@rapidsai/cudf';

      // Float64Series
      Series.new([50, 40, 30, 20, 10, 0]).sortValues(false) // [50, 40, 30, 20, 10, 0]
      Series.new([50, 40, 30, 20, 10, 0]).sortValues(true) // [0, 10, 20, 30, 40, 50]

      // StringSeries
      Series.new(["a", "b", "c", "d", "e"]).sortValues(false) // ["e", "d", "c", "b", "a"]
      Series.new(["a", "b", "c", "d", "e"]).sortValues(true) // ["a", "b", "c", "d", "e"]

      // Bool8Series
      Series.new([true, false, true, true, false]).sortValues(true) // [false, false, true,
      true, true] Series.new([true, false, true, true, false]).sortValues(false) // [true,
      true, true, false, false]

      // NullOrder usage
      Series.new([50, 40, 30, 20, 10, null]).sortValues(false, 'before') // [50, 40, 30, 20,
      10, null]

      Series.new([50, 40, 30, 20, 10, null]).sortValues(false, 'after') // [null, 50, 40, 30,
      20, 10]
    • Compute the square-root (x^0.5) for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([-1.2, 2.5, 4]).sqrt(); // [NaN, 1.5811388300841898, 2]
    • Return sample standard deviation of the Series. Normalized by N-1 by default. This can be changed using the ddof argument

      Parameters

      • skipNulls: boolean = true

        Exclude NA/null values. If an entire row/column is NA, the result will be NA.

      • ddof: number = 1

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

      • OptionalmemoryResource: MemoryResource

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

      Returns number

      The standard deviation of all the values in this Series.

      import {Series} from '@rapidsai/cudf';

      const a = Series.new([1, 2, 3, 4, 5]);

      //skipNulls=true, ddof=1
      a.std() // 1.5811388300841898
      a.std(true, 2) // 1.8257418583505534
      a.std(true, 5) // NaN, ddof>=a.length results in NaN
    • Subtract this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to subtract from this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.sub(3); // [7, 9, 11, 17]
      a.sub(b); // [7, 10, 13, 17]
    • Subtract this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to subtract from this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.sub(3); // [7, 9, 11, 17]
      a.sub(b); // [7, 10, 13, 17]
    • Subtract this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to subtract from this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.sub(3); // [7, 9, 11, 17]
      a.sub(b); // [7, 10, 13, 17]
    • Subtract this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to subtract from this Series.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.sub(3); // [7, 9, 11, 17]
      a.sub(b); // [7, 10, 13, 17]
    • Parameters

      • skipNulls: boolean = true
      • OptionalmemoryResource: MemoryResource

      Returns bigint

    • Parameters

      • skipNulls: boolean = true
      • OptionalmemoryResource: MemoryResource

      Returns bigint

    • Returns the last n rows.

      Parameters

      • n: number = 5

        The number of rows to return.

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      const a = Series.new([4, 6, 8, 10, 12, 1, 2]);
      const b = Series.new(["foo", "bar", "test"]);

      a.tail(); // [8, 10, 12, 1, 2]
      b.tail(1); // ["test"]
      a.tail(-1); // throws index out of bounds error
    • Compute the trigonometric tangent for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).tan(); // [0, 1.6197751905438615, 1.557407724654902]
    • Compute the hyperbolic tangent for each value in this Series.

      Parameters

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

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

      import {Series} from '@rapidsai/cudf';

      Series.new([0, 45, 1]).tanh(); // [0, 1, 0.7615941559557649]
    • Copy the underlying device memory to host and return an Array (or TypedArray) of the values.

      Returns BigInt64Array<ArrayBufferLike>

    • Returns a new string Series converting integer columns to hexadecimal characters.

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

      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

      • OptionalmemoryResource: MemoryResource

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

      Returns StringSeries

    • Return a string with a tabular representation of the Series, pretty-printed according to the options given.

      Parameters

      • options: DisplayOptions & { name?: string } = {}

      Returns string

    • True-divide this Series and another Series or scalar value.

      Parameters

      • rhs: bigint

        The other Series or scalar to true-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Int64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.trueDiv(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.trueDiv(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • True-divide this Series and another Series or scalar value.

      Parameters

      • rhs: number

        The other Series or scalar to true-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Float64Series

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.trueDiv(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.trueDiv(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • True-divide this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to true-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.trueDiv(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.trueDiv(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • True-divide this Series and another Series or scalar value.

      Type Parameters

      Parameters

      • rhs: R

        The other Series or scalar to true-divide this Series by.

      • OptionalmemoryResource: MemoryResource

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

      Returns Series<CommonType<Int64, R["type"]>>

      A Series of a common numeric type with the results of the binary operation.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([10, 12, 14, 20]);
      const b = Series.new([3, 2, 1, 3]);

      a.trueDiv(3); // [3.3333333333333335, 4, 4.666666666666667, 6.666666666666667]
      a.trueDiv(b); // [3.3333333333333335, 6, 14, 6.666666666666667]
    • Returns a new Series with only the unique values that were found in the original

      Parameters

      • nullsEqual: boolean = true

        Determines whether nulls are handled as equal values.

      • OptionalmemoryResource: MemoryResource

        Memory resource used to allocate the result Column's device memory.

      Returns Int64Series

      series without duplicate values

      import {Series} from '@rapidsai/cudf';

      // Float64Series
      Series.new([null, null, 1, 2, 3, 3]).unique(true) // [null, 1, 2, 3]
      Series.new([null, null, 1, 2, 3, 3]).unique(false) // [null, null, 1, 2, 3]
    • Returns an object with keys "value" and "count" whose respective values are new Series containing the unique values in the original series and the number of times they occur in the original series.

      Returns { count: Int32Series; value: Int64Series }

      object with keys "value" and "count"

    • Return unbiased variance of the Series. Normalized by N-1 by default. This can be changed using the ddof argument

      Parameters

      • skipNulls: boolean = true

        Exclude NA/null values. If an entire row/column is NA, the result will be NA.

      • ddof: number = 1

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

      • OptionalmemoryResource: MemoryResource

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

      Returns number

      The unbiased variance of all the values in this Series.

      import {Series} from '@rapidsai/cudf';
      const a = Series.new([1, 2, 3, 4, 5, null]);

      a.var() // 2.5
      a.var(true, 2) // 3.333333333333332
      a.var(true, 5) // NaN, ddof>=a.length results in NaN
    • View the data underlying this Series as a new dtype (similar to reinterpret_cast in C++).

      Type Parameters

      Parameters

      • dataType: R

      Returns Series<R>

      Series of same size as the current Series containing result of the cast operation.

      The length of this Series must divide evenly into the size of the desired data type.

      Series with nulls may only be viewed as dtypes of the same element width.

    • Create a new cudf.Series from an apache arrow vector

      Type Parameters

      • T extends Vector<any>

      Parameters

      • input: T

      Returns Series<ArrowToCUDFType<T["type"]>>

      import {Series, Int32} from '@rapidsai/cudf';
      import * as arrow from 'apache-arrow';

      const arrow_vec = arrow.vectorFromArray(new Int32Array([1,2,3,4])));
      const a = Series.new(arrow_vec); // Int32Series [1, 2, 3, 4]

      const arrow_vec_list = arrow.vectorFromArray(
      [[0, 1, 2], [3, 4, 5], [6, 7, 8]],
      new arrow.List(arrow.Field.new({ name: 'ints', type: new arrow.Int32 })),
      );

      const b = Series.new(arrow_vec_list) // ListSeries [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

      const arrow_vec_struct = arrow.vectorFromArray(
      [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }],
      new arrow.Struct([
      arrow.Field.new({ name: 'x', type: new arrow.Int32 }),
      arrow.Field.new({ name: 'y', type: new arrow.Int32 })
      ]),
      );

      const c = Series.new(arrow_vec_struct);
      // StructSeries [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }]
    • Create a new cudf.Series from SeriesProps or a cudf.Column

      Type Parameters

      Parameters

      • input: T

      Returns T

      import {Series, Int32} from '@rapidsai/cudf';

      //using SeriesProps
      const a = Series.new({type: new Int32, data: [1, 2, 3, 4]}); // Int32Series [1, 2, 3, 4]

      //using underlying cudf.Column
      const b = Series.new(a._col); // Int32Series [1, 2, 3, 4]
    • Create a new cudf.Series from an apache arrow vector

      Type Parameters

      Parameters

      Returns Series<T>

      import {Series, Int32} from '@rapidsai/cudf';
      import * as arrow from 'apache-arrow';

      const arrow_vec = arrow.vectorFromArray(new Int32Array([1,2,3,4])));
      const a = Series.new(arrow_vec); // Int32Series [1, 2, 3, 4]

      const arrow_vec_list = arrow.vectorFromArray(
      [[0, 1, 2], [3, 4, 5], [6, 7, 8]],
      new arrow.List(arrow.Field.new({ name: 'ints', type: new arrow.Int32 })),
      );

      const b = Series.new(arrow_vec_list) // ListSeries [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

      const arrow_vec_struct = arrow.vectorFromArray(
      [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }],
      new arrow.Struct([
      arrow.Field.new({ name: 'x', type: new arrow.Int32 }),
      arrow.Field.new({ name: 'y', type: new arrow.Int32 })
      ]),
      );

      const c = Series.new(arrow_vec_struct);
      // StructSeries [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }]
    • Create a new cudf.Series from an apache arrow vector

      Type Parameters

      Parameters

      Returns Series<T>

      import {Series, Int32} from '@rapidsai/cudf';
      import * as arrow from 'apache-arrow';

      const arrow_vec = arrow.vectorFromArray(new Int32Array([1,2,3,4])));
      const a = Series.new(arrow_vec); // Int32Series [1, 2, 3, 4]

      const arrow_vec_list = arrow.vectorFromArray(
      [[0, 1, 2], [3, 4, 5], [6, 7, 8]],
      new arrow.List(arrow.Field.new({ name: 'ints', type: new arrow.Int32 })),
      );

      const b = Series.new(arrow_vec_list) // ListSeries [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

      const arrow_vec_struct = arrow.vectorFromArray(
      [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }],
      new arrow.Struct([
      arrow.Field.new({ name: 'x', type: new arrow.Int32 }),
      arrow.Field.new({ name: 'y', type: new arrow.Int32 })
      ]),
      );

      const c = Series.new(arrow_vec_struct);
      // StructSeries [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }]
    • Create a new cudf.Int8Series

      Parameters

      Returns Int8Series

      import {
      Series,
      Int8Series,
      Int8
      } from '@rapidsai/cudf';

      // Int8Series [1, 2, 3]
      const a = Series.new(new Int8Array([1, 2, 3]));
      const b = Series.new(new Int8Buffer([1, 2, 3]));
    • Create a new cudf.Int16Series

      Parameters

      Returns Int16Series

      import {
      Series,
      Int16Series,
      Int16
      } from '@rapidsai/cudf';

      // Int16Series [1, 2, 3]
      const a = Series.new(new Int16Array([1, 2, 3]));
      const b = Series.new(new Int16Buffer([1, 2, 3]));
    • Create a new cudf.Int32Series

      Parameters

      Returns Int32Series

      import {
      Series,
      Int32Series,
      Int32
      } from '@rapidsai/cudf';

      // Int32Series [1, 2, 3]
      const a = Series.new(new Int32Array([1, 2, 3]));
      const b = Series.new(new Int32Buffer([1, 2, 3]));
    • Create a new cudf.Uint8Series

      Parameters

      Returns Uint8Series

      import {
      Series,
      Uint8Series,
      Uint8
      } from '@rapidsai/cudf';

      // Uint8Series [1, 2, 3]
      const a = Series.new(new Uint8Array([1, 2, 3]));
      const b = Series.new(new Uint8Buffer([1, 2, 3]));
      const c = Series.new(new Uint8ClampedArray([1, 2, 3]));
      const d = Series.new(new Uint8ClampedBuffer([1, 2, 3]));
    • Create a new cudf.Uint16Series

      Parameters

      Returns Uint16Series

      import {
      Series,
      Uint16Series,
      Uint16
      } from '@rapidsai/cudf';

      // Uint16Series [1, 2, 3]
      const a = Series.new(new Uint16Array([1, 2, 3]));
      const b = Series.new(new Uint16Buffer([1, 2, 3]));
    • Create a new cudf.Uint32Series

      Parameters

      Returns Uint32Series

      import {
      Series,
      Uint32Series,
      Uint32
      } from '@rapidsai/cudf';

      // Uint32Series [1, 2, 3]
      const a = Series.new(new Uint32Array([1, 2, 3]));
      const b = Series.new(new Uint32Buffer([1, 2, 3]));
    • Create a new cudf.Uint64Series

      Parameters

      Returns Uint64Series

      import {
      Series,
      Uint64Series,
      Uint64
      } from '@rapidsai/cudf';

      // Uint64Series [1n, 2n, 3n]
      const a = Series.new(new BigUint64Array([1n, 2n, 3n]));
      const b = Series.new(new Uint64Buffer([1n, 2n, 3n]));
    • Create a new cudf.Float32Series

      Parameters

      Returns Float32Series

      import {
      Series,
      Float32Series,
      Float32
      } from '@rapidsai/cudf';

      // Float32Series [1, 2, 3]
      const a = Series.new(new Float32Array([1, 2, 3]));
      const b = Series.new(new Float32Buffer([1, 2, 3]));
    • Create a new cudf.StringSeries

      Parameters

      • input: (string | null | undefined)[]

      Returns StringSeries

      import {Series} from '@rapidsai/cudf';

      // StringSeries ["foo", "bar", "test", null]
      const a = Series.new(["foo", "bar", "test", null]);
    • Create a new cudf.Float64Series

      Parameters

      • input: Float64Array<ArrayBufferLike> | (number | null | undefined)[] | Float64Buffer

      Returns Float64Series

      import {Series} from '@rapidsai/cudf';

      // Float64Series [1, 2, 3, null, 4]
      const a = Series.new([1, 2, 3, undefined, 4]);
    • Create a new cudf.Int64Series

      Parameters

      • input: BigInt64Array<ArrayBufferLike> | (bigint | null | undefined)[] | Int64Buffer

      Returns Int64Series

      import {Series} from '@rapidsai/cudf';

      // Int64Series [1n, 2n, 3n, null, 4n]
      const a = Series.new([1n, 2n, 3n, undefined, 4n]);
    • Create a new cudf.Bool8Series

      Parameters

      • input: (boolean | null | undefined)[]

      Returns Bool8Series

      import {Series} from '@rapidsai/cudf';

      // Bool8Series [true, false, null, false]
      const a = Series.new([true, false, undefined, false]);
    • Create a new cudf.TimestampMillisecondSeries

      Parameters

      • input: (Date | null | undefined)[]

      Returns TimestampMillisecondSeries

      import {Series} from '@rapidsai/cudf';

      // TimestampMillisecondSeries [2021-05-13T00:00:00.000Z, null, 2021-05-13T00:00:00.000Z,
      null] const a = Series.new([new Date(), undefined, new Date(), undefined]);
    • Create a new cudf.ListSeries that contain cudf.StringSeries elements.

      Parameters

      • input: (string | null | undefined)[][]

      Returns ListSeries<Utf8String>

      import {Series} from '@rapidsai/cudf';

      // ListSeries [["foo", "bar"], ["test", null]]
      const a = Series.new([["foo", "bar"], ["test",null]]);
      a.getValue(0) // StringSeries ["foo", "bar"]
      a.getValue(1) // StringSeries ["test", null]
    • Create a new cudf.ListSeries that contain cudf.Float64Series elements.

      Parameters

      • input: (number | null | undefined)[][]

      Returns ListSeries<Float64>

      import {Series} from '@rapidsai/cudf';

      // ListSeries [[1, 2], [3, null, 4]]
      const a = Series.new([[1, 2], [3, undefined, 4]]);
      a.getValue(0) // Float64Series [1, 2]
      a.getValue(1) // Float64Series [3, null, 4]
    • Create a new cudf.ListSeries that contain cudf.Int64Series elements.

      Parameters

      • input: (bigint | null | undefined)[][]

      Returns ListSeries<Int64>

      import {Series} from '@rapidsai/cudf';

      // ListSeries [[1n, 2n], [3n, null, 4n]]
      const a = Series.new([[1n, 2n], [3n, undefined, 4n]]);
      a.getValue(0) // Int64Series [1n, 2n]
      a.getValue(1) // Int64Series [3n, null, 4n]
    • Create a new cudf.ListSeries that contain cudf.Bool8Series elements.

      Parameters

      • input: (boolean | null | undefined)[][]

      Returns ListSeries<Bool8>

      import {Series} from '@rapidsai/cudf';

      // ListSeries [[true, false], [null, false]]
      const a = Series.new([[true, false], [undefined, false]]);
      a.getValue(0) // Bool8Series [true, false]
      a.getValue(1) // Bool8Series [null, false]
    • Create a new cudf.ListSeries that contain cudf.TimestampMillisecondSeries elements.

      Parameters

      • input: (Date | null | undefined)[][]

      Returns ListSeries<TimestampMillisecond>

      import {Series} from '@rapidsai/cudf';

      // ListSeries [[2021-05-13T00:00:00.000Z, null], [null, 2021-05-13T00:00:00.000Z]]
      const a = Series.new([[new Date(), undefined], [undefined, new Date()]]);
      a.getValue(0) // TimestampMillisecondSeries [2021-05-13T00:00:00.000Z, null]
      a.getValue(1) // TimestampMillisecondSeries [null, 2021-05-13T00:00:00.000Z]
    • Create a new cudf.Series from an apache arrow vector

      Type Parameters

      • T extends readonly unknown[]

      Parameters

      • input: T

      Returns Series<ArrowToCUDFType<JavaScriptArrayDataType<T>>>

      import {Series, Int32} from '@rapidsai/cudf';
      import * as arrow from 'apache-arrow';

      const arrow_vec = arrow.vectorFromArray(new Int32Array([1,2,3,4])));
      const a = Series.new(arrow_vec); // Int32Series [1, 2, 3, 4]

      const arrow_vec_list = arrow.vectorFromArray(
      [[0, 1, 2], [3, 4, 5], [6, 7, 8]],
      new arrow.List(arrow.Field.new({ name: 'ints', type: new arrow.Int32 })),
      );

      const b = Series.new(arrow_vec_list) // ListSeries [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

      const arrow_vec_struct = arrow.vectorFromArray(
      [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }],
      new arrow.Struct([
      arrow.Field.new({ name: 'x', type: new arrow.Int32 }),
      arrow.Field.new({ name: 'y', type: new arrow.Int32 })
      ]),
      );

      const c = Series.new(arrow_vec_struct);
      // StructSeries [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }]
    • Create a new cudf.Series from an apache arrow vector

      Type Parameters

      Parameters

      • input:
            | (boolean | null | undefined)[]
            | (number | null | undefined)[]
            | (bigint | null | undefined)[]
            | (string | null | undefined)[]
            | (Date | null | undefined)[]
            | AbstractSeries<T>
            | Column<T>
            | SeriesProps<T>
            | Vector<T>
            | (string | null | undefined)[][]
            | (number | null | undefined)[][]
            | (bigint | null | undefined)[][]
            | (boolean | null | undefined)[][]
            | (Date | null | undefined)[][]

      Returns Series<T>

      import {Series, Int32} from '@rapidsai/cudf';
      import * as arrow from 'apache-arrow';

      const arrow_vec = arrow.vectorFromArray(new Int32Array([1,2,3,4])));
      const a = Series.new(arrow_vec); // Int32Series [1, 2, 3, 4]

      const arrow_vec_list = arrow.vectorFromArray(
      [[0, 1, 2], [3, 4, 5], [6, 7, 8]],
      new arrow.List(arrow.Field.new({ name: 'ints', type: new arrow.Int32 })),
      );

      const b = Series.new(arrow_vec_list) // ListSeries [[0, 1, 2], [3, 4, 5], [6, 7, 8]]

      const arrow_vec_struct = arrow.vectorFromArray(
      [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }],
      new arrow.Struct([
      arrow.Field.new({ name: 'x', type: new arrow.Int32 }),
      arrow.Field.new({ name: 'y', type: new arrow.Int32 })
      ]),
      );

      const c = Series.new(arrow_vec_struct);
      // StructSeries [{ x: 0, y: 3 }, { x: 1, y: 4 }, { x: 2, y: 5 }]
    • Constructs a Series from a text file path.

      Parameters

      • filepath: string

        Path of the input file.

      • delimiter: string

        Optional delimiter.

      Returns StringSeries

      StringSeries from the file, split by delimiter.

      If delimiter is omitted, the default is ''.

      import {Series} from '@rapidsai/cudf';

      const infile = Series.readText('./inputAsciiFile.txt')
    • Constructs a Series with a sequence of values.

      Type Parameters

      Parameters

      • opts: {
            init?: U["scalarType"];
            memoryResource?: MemoryResource;
            size: number;
            step?: U["scalarType"];
            type?: U;
        }

        Options for creating the sequence

      Returns Series<U>

      Series with the sequence

      If init is omitted, the default is 0.

      If step is omitted, the default is 1.

      If type is omitted, the default is Int32.

      import {Series, Int64, Float32} from '@rapidsai/cudf';

      Series.sequence({size: 5}).toArray() // Int32Array(5) [0, 1, 2, 3, 4]
      Series.sequence({size: 5, init: 5}).toArray() // Int32Array(5) [5, 6, 7, 8, 9]
      Series
      .sequence({ size: 5, init: 0, type: new Int64 })
      .toArray() // BigInt64Array(5) [0n, 1n, 2n, 3n, 4n]
      Series
      .sequence({ size: 5, step: 2, init: 1, type: new Float32 })
      .toArray() // Float32Array(5) [1, 3, 5, 7, 9]