Overview of Narwhals compatibility layer
mainNarwhals is an extremely lightweight and extensible compatibility layer designed to allow developers to write dataframe-agnostic code. It provides a unified interface that works across multiple dataframe libraries without requiring them as dependencies.
Supported Libraries
- Full API support (Eager):
cuDF,Modin,pandas,Polars,PyArrow. - Lazy-only support:
Daft,Dask,DuckDB,Ibis,PySpark,SQLFrame.
Key Features
- Polars-based API: Uses a subset of the Polars API, so no new syntax needs to be learned.
- Zero dependencies: Narwhals only uses the objects passed to it by the user, ensuring your project remains lightweight.
- Lazy and Eager separation: Provides separate APIs for lazy and eager execution using expressions.
- Full static typing: Leverages
narwhals.typingto provide IDE support and type safety. - Negligible overhead: Designed to be highly performant with minimal impact on execution speed.