Skip to main content

Smart lazy DataFrame execution engine across pandas, polars, and duckdb

Project description

LazyFrame

LazyFrame is a smart lazy DataFrame execution engine with a unified API over multiple backends.

Highlights

  • Chainable DataFrame API (filter, select, groupby, agg, sort)
  • Logical plan construction with lazy execution (.run() is the trigger)
  • Auto backend selection (pandas, polars, duckdb placeholder)
  • Simple optimizer with filter pushdown
  • Explainability via .explain()
  • Actionable hints via .optimize()

Quick start

from lazyframe import lf

df = lf.load({
    "age": [20, 30, 40],
    "country": ["BD", "US", "IN"],
    "income": [1000, 2000, 3000],
})

result = (
    df.filter(df.age > 18)
      .groupby("country")
      .agg({"income": "mean"})
      .sort("income", descending=True)
)

print(result.explain())
print(result.run())

Install for development

pip install -e ".[dev]"
pytest

Backend strategy

  • strategy="auto" chooses backend by dataset size heuristic
  • strategy="pandas" forces pandas
  • strategy="polars" forces polars fallback backend
  • strategy="duckdb" forces duckdb placeholder backend

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazyframe-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazyframe-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file lazyframe-0.1.0.tar.gz.

File metadata

  • Download URL: lazyframe-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for lazyframe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e835695246fe68ee246bc10cdeec28dbd3b01746e14c5b8e0c54c5a83fe6e806
MD5 919ffb79ee95636ce60cfd17c995b94c
BLAKE2b-256 38a75bca2597ec646d23fb3eaf26907f403e6951f582e72c3b8d34b16ca687c0

See more details on using hashes here.

File details

Details for the file lazyframe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lazyframe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for lazyframe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d7f2498e5cdc93e4c6fb16274dacc6306873eb1046a968fee10d88e682b6496
MD5 c88a284fdb80ef41247aa63982aefe8f
BLAKE2b-256 e8e98b9c9b65804e9ed62adbdc548b12cde438531a972a18e16bf050a3bd9e80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page