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,duckdbplaceholder) - 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 heuristicstrategy="pandas"forces pandasstrategy="polars"forces polars fallback backendstrategy="duckdb"forces duckdb placeholder backend
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e835695246fe68ee246bc10cdeec28dbd3b01746e14c5b8e0c54c5a83fe6e806
|
|
| MD5 |
919ffb79ee95636ce60cfd17c995b94c
|
|
| BLAKE2b-256 |
38a75bca2597ec646d23fb3eaf26907f403e6951f582e72c3b8d34b16ca687c0
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d7f2498e5cdc93e4c6fb16274dacc6306873eb1046a968fee10d88e682b6496
|
|
| MD5 |
c88a284fdb80ef41247aa63982aefe8f
|
|
| BLAKE2b-256 |
e8e98b9c9b65804e9ed62adbdc548b12cde438531a972a18e16bf050a3bd9e80
|