# narwhals-dev/narwhals

Lightweight and extensible compatibility layer between dataframe libraries!

Repository: https://github.com/narwhals-dev/narwhals
Canonical: https://ross.abutalabs.com/products/narwhals
Homepage: https://narwhals-dev.github.io/narwhals/
Language: Python
License: MIT
License Family: permissive
Topics: cudf, ibis, pandas, polars, pyarrow, dask, duckdb, pyspark
Last push: 2026-08-26T09:06:55+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 66
- inputs: {"age_days": 926, "days_push": 7, "days_rel": 13, "gap_med": 3, "n_releases_24m": 120}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1708, forks 211 (observed 2026-08-28T04:05:25.054067+00:00)

## What it is
Narwhals is a lightweight, zero-dependency Python compatibility layer that lets code written against a subset of the Polars API run on pandas, Polars, PyArrow, cuDF, Modin, Dask, DuckDB, Ibis, PySpark, and more. It is aimed at library authors who want to make their dataframe-consuming code dataframe-agnostic without hard dependencies on any specific backend.

## Use cases
- write dataframe-agnostic library code that works with pandas and polars
- support multiple dataframe backends without adding dependencies
- migrate code between pandas and polars with minimal changes
- run the same dataframe logic on spark, duckdb, or dask
- build a tool that accepts any dataframe library as input
- use polars expressions api on top of pandas dataframes

## When to choose
- you are building a library or service that consumes dataframes and want backend flexibility
- you want zero-dependency interoperability across dataframe libraries
- you prefer the polars api but need to support pandas users
- you need lazy and eager dataframe support with full static typing

## When to avoid
- you only ever use a single dataframe library and need no interoperability
- you need dataframe features outside narwhals' supported api subset
- you want a full dataframe implementation rather than a compatibility layer

## Facets
- artifact type: library
- maturity: active
- function: data-science, developer-tools
- domain: data-science, developer-tools
- platform: python
- tags: dataframes, interoperability, compatibility-layer, polars-api, pandas, zero-dependency, data-engineering

## Member repositories
- narwhals-dev/narwhals (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:25.054067+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:37:01.499985+00:00, confidence not recorded.
  - readme: https://github.com/narwhals-dev/narwhals (fetched 2026-08-28T04:05:25.054067+00:00, sha a6e81940714e)
  - homepage: https://narwhals-dev.github.io/narwhals/ (fetched 2026-08-29T11:11:20.466789+00:00, sha 475586a018fb)
  - registry_pypi: https://pypi.org/pypi/narwhals/json (fetched 2026-08-29T11:11:20.475673+00:00, sha cc2099712a7d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
