dataframe-api-compat
Implementation of the DataFrame Standard for pandas and Polars
What it is and what it does
Dataframe API Compat is a thin abstraction layer that sits between your code and dataframe libraries like pandas and Polars, allowing you to write dataframe operations using the Python Dataframe API Standard. Instead of learning library-specific syntax, you write against a common interface that any compliant dataframe library can implement. The package itself is intentionally minimal—under 50 kB, pure Python, with only packaging as a dependency—making it easy to add to any project without bloat.
The main use case is writing library-agnostic dataframe code: you can prototype with pandas, switch to Polars for performance, or support multiple backends without rewriting your logic. It's designed for teams or libraries that want to avoid lock-in to a single dataframe implementation while still using standard, predictable operations.
Use it for:
- Write dataframe transformation code that works with both pandas and Polars without conditional imports or adapter code.
- Build a library or tool that accepts dataframes from multiple sources and processes them with a single code path.
- Prototype analysis with pandas, then swap to Polars for production performance without refactoring your dataframe calls.
- Support multiple dataframe backends in a data pipeline without maintaining separate code branches for each.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a lightweight compatibility layer that lets you write dataframe code once and run it against pandas, Polars, or any other library implementing the Python Dataframe API Standard.
Yes, if you need to write dataframe code that works across multiple libraries or want to avoid lock-in to a single implementation. The low install friction and permissive license make it a safe addition. However, maintenance is dormant (no commits since April 2024), so verify that the standard implementation covers your actual use cases and that the libraries you target are fully compliant before committing to it in production.
Install
dataframe-api-compat on PyPI
pip
pip install dataframe-api-compatuv
uv add dataframe-api-compatpoetry
poetry add dataframe-api-compatInstalling dataframe-api-compat
Before you install
Low friction: pure Python wheel under 50 kB with only packaging as a runtime dependency. Dormant maintenance since April 2024 (840 days), though the repository remains active and unarchived.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install dataframe-api-compat
import dataframe_api_compat
# Use standard DataFrame API methods across pandas, Polars, or other compliant libraries
Requires Python 3.8 or later; the underlying dataframe libraries (pandas, Polars, etc.) must implement the Python Dataframe API Standard.
Verify before relying
- How complete is the standard implementation coverage across different dataframe libraries in practice.
- Whether dormant status (no commits since April 2024) signals incomplete standard support or stable maturity.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — packaging |
| Maintenance | dormant — 840 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 122,128/month — #11,959 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dataframe_api_compat-0.2.7-py3-none-any.whl
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
narwhalsNarwhals provides a lightweight compatibility…
permissive · top 1,000 on PyPI
datacompyDataComPy compares two DataFrames across…
permissive · top 5,000 on PyPI
modinModin is a drop-in replacement for pandas that…
permissive · top 5,000 on PyPI
array-api-compatProvides a unified wrapper around NumPy, CuPy,…
permissive · top 5,000 on PyPI
percentifyPercentify provides one-call exploratory…
permissive · top 15,000 on PyPI
polars-runtime-compatPolars-runtime-compat provides binary wheels…
permissive · top 15,000 on PyPI
itablesRenders Pandas and Polars DataFrames as…
permissive · top 5,000 on PyPI
array-api-strictProvides a strict, minimal implementation of…
permissive · top 15,000 on PyPI
fastf1FastF1 provides Python access to Formula 1…
permissive · top 5,000 on PyPI
bigframesBigFrames provides a pandas-compatible…
permissive · top 5,000 on PyPI