irx.builtins.collections.dataframe

irx.builtins.collections.dataframe

Source: packages/irx/src/irx/builtins/collections/dataframe.py

title: DataFrame helpers layered on the builtin Arrow runtime.
summary: >-
  Define IRx's backend-neutral DataFrame metadata helpers on top of Arrow Table
  and ChunkedArray storage.

Functions

schema_from_type(type_: astx.DataFrameType) -> DataFrameSchema | None

title: Return static schema metadata from one DataFrame type.
parameters:
  type_:
    type: astx.DataFrameType
returns:
  type: DataFrameSchema | None

dataframe_primitive_type_name(type_: astx.DataType | None) -> str | None

title: Return the builtin primitive storage name for one column type.
parameters:
  type_:
    type: astx.DataType | None
returns:
  type: str | None

dataframe_type_id(type_: astx.DataType | None) -> int | None

title: Return the Arrow runtime type id for one supported column type.
parameters:
  type_:
    type: astx.DataType | None
returns:
  type: int | None

dataframe_column_type_is_supported(type_: astx.DataType | None) -> bool

title: Return whether one type is supported for MVP DataFrame columns.
parameters:
  type_:
    type: astx.DataType | None
returns:
  type: bool

Classes

DataFrameSchemaColumn

title: Static DataFrame schema column metadata.
attributes:
  name:
    type: str
  type_:
    type: astx.DataType
  nullable:
    type: bool
  index:
    type: int

DataFrameSchema

title: Static DataFrame schema metadata.
attributes:
  columns:
    type: tuple[DataFrameSchemaColumn, Ellipsis]

Methods

column_count(self) -> int
title: Return the number of columns in this schema.
returns:
  type: int
column(self, name: str) -> DataFrameSchemaColumn | None
title: Return one schema column by name.
parameters:
  name:
    type: str
returns:
  type: DataFrameSchemaColumn | None