Metadata-Version: 2.4
Name: LazyFrame
Version: 0.1.0
Summary: Smart lazy DataFrame execution engine across pandas, polars, and duckdb
Author-email: Arefin Amin <arefinamin994@gmail.com>
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pandas>=2.0.0
Provides-Extra: polars
Requires-Dist: polars>=0.20.0; extra == "polars"
Provides-Extra: duckdb
Requires-Dist: duckdb>=1.0.0; extra == "duckdb"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"

# 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

```python
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

```bash
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
