skillfed

dataframe-api-compat

Implementation of the DataFrame Standard for pandas and Polars

dataframe-api-compat v0.2.7 122.1K downloads/30d#11,959 on PyPI41
Permissive license DORMANT released

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-compat

uv

uv add dataframe-api-compat

poetry

poetry add dataframe-api-compat

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

dataframe api standard compatibilitypandas polars interop layerwrite once run anywhere dataframesdataframe abstraction layercross-dataframe library supportdataframe api wrapperunified dataframe interface
dataframe-abstractioncross-library-compat

More Information Analysis packages