Type-safe, ergonomic table operations, with the speed of Polars.
pip install portabellasPortabellas is built on Polars, so you get the same query optimization and parallelization, with these improvements on top:
-
Early validation: Catch type and name errors directly where they occur, with negligible runtime overhead.
# Portabellas from portabellas import Table data = Table({"name": ["Alice", "Bob"], "age": [25, 30]}) data = data.add_computed_column("result", lambda row: row["age"].struct.get("name")) # ^^^^^^^^^^^^^^^^^ # # ColumnTypeError: Expected struct type, got i64
# Polars — same mistake, but error is deferred and misleading import polars as pl data = pl.LazyFrame({"name": ["Alice", "Bob"], "age": [25, 30]}) data = data.with_columns(result=pl.col("age").struct.field("name")) # No error data = data.collect() # ^^^^^^^^^^^^^^ # # StructFieldNotFoundError: name
-
No lazy/eager split: No need to manually switch between lazy and eager mode. Lazy evaluation is active whenever possible. Operations that require eager mode handle it automatically.
-
Familiar abstractions: Work with
Table,Column,Row, andCell— names that match how you think about data, not how the library stores it.
Fun fact: "Portabellas" is an anagram of "Polars table". And, as for any proper Python package, it starts with P.
- Install uv.
- Run
uv syncto generate a venv and install the dependencies. - Activate your venv by running
source .venv/bin/activate.
We use pre-commit hooks for linting and formatting. Install the commit hooks locally via:
pre-commit installThe configuration can be adapted in .pre-commit-config.yaml.