narwhals
Extremely lightweight compatibility layer between dataframe libraries
Install
narwhals on PyPI
pip
pip install narwhalsuv
uv add narwhalspoetry
poetry add narwhalsPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 31 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: narwhals-2.24.0-py3-none-any.whl
Keywords: dataframes, interoperability, pandas, polars, pyarrow, dask, modin, cudf
About narwhals
from the package's own PyPI description — quoted content, verbatim
Narwhals
<h1 align="center"> <img width="400" alt="narwhals_small" src="https://github.com/user-attachments/assets/968545af-ea0f-48bb-8377-144e93f7abf8"> </h1>
PyPI version (image) Downloads (image) Trusted publishing (image) PYPI - Types (image) LFX Health Score (image) OpenSSF Scorecard (image)
Extremely lightweight and extensible compatibility layer between dataframe libraries!
- Full API support: cuDF, Modin, pandas, Polars, PyArrow.
- Lazy-only support: Daft, Dask, DuckDB, Ibis, PySpark,...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Narwhals is a zero-dependency compatibility layer that lets you write dataframe code once and run it against pandas, Polars, DuckDB, Dask, PySpark, cuDF, Modin, PyArrow, and other libraries without importing them.
Narwhals installs with zero runtime dependencies and sees active maintenance with a release 31 days ago. The pure-Python wheel distribution and support for Python 3.10–3.14 make installation frictionless across environments.
MIT license permits unrestricted commercial and private use, modification, and redistribution with minimal obligations—ideal for both library and application integration.
Usage
pip install narwhals
import narwhals as nw
def process_df(df):
return nw.from_native(df).select('column').to_native()
# Works with pandas, Polars, DuckDB, etc.
Requires Python ≥3.10; the underlying dataframe library (pandas, Polars, etc.) must be installed separately by the user.
Verdict: Narwhals is a production-ready (Development Status 5), actively maintained library with no security vulnerabilities, zero dependencies, and full type hints. It solves a genuine pain point for library maintainers needing dataframe agnosticism without bloating their dependency tree. The top-1000 popularity tier and adoption by major projects (altair, bokeh, lightgbm, pandera) validate its utility.
Needs verification
- Whether the stated 'negligible overhead' claim holds for your specific workload patterns and dataframe sizes.
- Completeness of Polars API coverage for your particular use case—only a subset is supported.
- Performance characteristics when chaining multiple lazy operations across different backends.
Similar packages
permissive · top 1,000 on PyPI
polarspermissive · top 1,000 on PyPI
lightgbmunclear · top 1,000 on PyPI
polars-runtime-32permissive · top 1,000 on PyPI
pandas-gbqpermissive · top 1,000 on PyPI
geopandaspermissive · top 1,000 on PyPI
apache-airflow-providers-common-sqlpermissive · top 1,000 on PyPI
pandas-stubspermissive · top 1,000 on PyPI
pandaspermissive · top 100 on PyPI
streamlitpermissive · top 1,000 on PyPI