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
Metadata
Release files for LazyFrame 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lazyframe-0.1.0.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lazyframe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / lazyframe-0.1.0.tar.gz
| Download URL | lazyframe-0.1.0.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e835695246fe68ee246bc10cdeec28dbd3b01746e14c5b8e0c54c5a83fe6e806
|
|
BLAKE2b-256 checksum How to use checksums |
38a75bca2597ec646d23fb3eaf26907f403e6951f582e72c3b8d34b16ca687c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / lazyframe-0.1.0-py3-none-any.whl
| Download URL | lazyframe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d7f2498e5cdc93e4c6fb16274dacc6306873eb1046a968fee10d88e682b6496
|
|
BLAKE2b-256 checksum How to use checksums |
e8e98b9c9b65804e9ed62adbdc548b12cde438531a972a18e16bf050a3bd9e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|