Represents a row of data in a DataFrame.

Row provides type-safe access to columnar data with support for various data types including primitives, dates, and binary data.

const row = new Row(schema, { name: "Alice", age: 30 });
const name = row.getString(0);
const age = row.getInt(1);

Implements

Indexable

  • [index: number]: any

Constructors

Accessors

  • get length(): number

    Returns the number of elements in the Row (alias for size()).

    Returns number

    The number of columns in this row

Methods

  • Checks whether the value at position i is null.

    Parameters

    • i: number

      The column index (0-based)

    Returns boolean

    True if the value is null or undefined, false otherwise

  • Gets the value at the specified column index.

    Parameters

    • i: number

      The column index (0-based)

    Returns any

    The value at the specified index as a plain JavaScript value

    Error if the field does not exist

  • Returns the value at position i, cast to type T.

    Type Parameters

    • T

      The type to cast the value to

    Parameters

    • i: number

      The column index (0-based)

    Returns T

    The value at the specified index, cast to type T

  • Returns the value at position i as a boolean.

    Parameters

    • i: number

      The column index (0-based)

    Returns boolean

    The boolean value at the specified index

    Error if the value is not a boolean

  • Returns the value at position i as a byte (8-bit signed integer).

    Parameters

    • i: number

      The column index (0-based)

    Returns number

    The byte value at the specified index (range: -128 to 127)

    Error if the value is not a valid byte

  • Returns the value at position i as a short (16-bit signed integer).

    Parameters

    • i: number

      The column index (0-based)

    Returns number

    The short value at the specified index (range: -32768 to 32767)

    Error if the value is not a valid short

  • Returns the value at position i as an integer (32-bit signed integer).

    Parameters

    • i: number

      The column index (0-based)

    Returns number

    The integer value at the specified index

    Error if the value is not a valid integer

  • Returns the value at position i as a long (64-bit signed integer).

    Parameters

    • i: number

      The column index (0-based)

    Returns bigint

    The bigint value at the specified index

    Error if the value cannot be converted to bigint

  • Returns the value at position i as a float (32-bit floating point number).

    Parameters

    • i: number

      The column index (0-based)

    Returns number

    The float value at the specified index

  • Returns the value at position i as a double (64-bit floating point number).

    Parameters

    • i: number

      The column index (0-based)

    Returns number

    The double value at the specified index

  • Returns the value at position i as a decimal number.

    Parameters

    • i: number

      The column index (0-based)

    Returns number

    The decimal value at the specified index

    Error if the value is not a valid decimal

  • Returns the value at position i as a string.

    Parameters

    • i: number

      The column index (0-based)

    Returns string

    The string value at the specified index

    Error if the value is not a string

  • Returns the value at position i as a Buffer (binary data).

    Parameters

    • i: number

      The column index (0-based)

    Returns Buffer

    The binary value as a Node.js Buffer

    Error if the value cannot be converted to binary

  • Returns the value at position i as a Uint8Array.

    Parameters

    • i: number

      The column index (0-based)

    Returns Uint8Array

    The binary value as a Uint8Array

    Error if the value is not a valid byte array

  • Returns the value at position i as a Date.

    Parameters

    • i: number

      The column index (0-based)

    Returns Date

    The date value at the specified index

    Error if the value cannot be converted to a Date

  • Returns the value at position i as a timestamp (Date).

    Parameters

    • i: number

      The column index (0-based)

    Returns Date

    The timestamp value as a Date object

    Error if the field is not a TimestampType or cannot be converted