Dataframe

Functions exchange dataframes as in-memory values. Polars DataFrame and LazyFrame annotations are recognized by default. Register other importable classes in [code.dataframes] so the Inspector and YAML authoring can recognize their annotations. Registration alone does not add runtime evaluation support.

The built-in Polars backend also supports PyArrow Table and RecordBatch values. Install PyArrow in the project environment and register its classes as eager dataframes for annotation inspection. See Python environment setup and Configure a project.

The Engine passes values between user functions unchanged. User functions must accept the types returned by their upstream functions. Analytical validation and bounded previews convert Arrow values to Polars for their own evaluation without replacing the values passed to functions. The built-in merge converts its Arrow inputs to Polars and returns a Polars dataframe.

StandardFrame wraps a dataframe with its class name and eager or lazy evaluation mode. It can use DataFrameClasses to recognize additional configured classes. head() limits rows without collecting a lazy frame, collect() returns a new wrapper with an eager value, and to_engineframe() returns a Polars dataframe without modifying the wrapped value. row_count is available for supported eager frames and is None for lazy frames without evaluating them. to_engineframe_pair() converts two dataframes to compatible Polars evaluation modes. Additional classes are recognized as metadata, but collection and engine conversion require a supported implementation.

The shared uptimely.dataframes package provides dataframe types, standardization, and backends for runtime components. Python annotation inspection remains in the codebase package.

Operator tests construct inputs according to their function parameter annotations. See operator cases for supported classes and handling of generic annotations and unions. Test comparisons evaluate Arrow and Polars results with Polars.

Polars can exchange data with other libraries using the shared Arrow interface, avoiding the need to implement and maintain a separate dataframe adapter for each integration. Libraries must support the relevant Arrow interface, and Uptimely's runtime support remains limited to the dataframe types described above. See Arrow interoperability for examples and limitations.