Implementation of the DataFrame Standard for pandas and Polars
Project description
DataFrame API Compat
Implementation of the DataFrame Standard for pandas and polars-eager
Note: there is ongoing discussion about lazy engines in the Standard. Until that has been resolved, this package should not be relied upon for polars-lazy.
What's this?
Please read our blog post! https://data-apis.org/blog/dataframe_standard_rfc/.
Documentation
Please check https://data-apis.org/dataframe-api/draft/API_specification/index.html for the methods supported by the Consortium Dataframe Standard.
How to try this out
Here's an example of how you can try this out:
import polars as pl
df = pl.DataFrame({'a': [1,2,3]})
df_std = df.__dataframe_consortium_standard__()
The object df_std
is a Standard-compliant DataFrame. Check the
API Specification
for the full list of methods supported on it.
Compliance with the Standard
This is mostly compliant. Notable differences:
- for pandas numpy dtypes, the null values (NaN) don't follow Kleene logic;
- for polars lazy, column reductions (e.g.
column.mean()
) are not implemented; - for polars lazy, comparisons between different dataframes are not implemented.
Installation
pip install dataframe-api-compat
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dataframe_api_compat-0.1.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0feab629b94e3f165c1de4bf2c4dd59f6b38469e24f92ab764c95fbd29f236b5 |
|
MD5 | 945de4a48352317f104cf9d5b3757a82 |
|
BLAKE2b-256 | 4499e2da84ce4bf55385a02607418a73b9560d06927f194a8fc5172a53a1782a |
Hashes for dataframe_api_compat-0.1.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5347b00e8de42c13869fc5e5cc66a3fe3fd4c066007f93ad12b56f4727da7522 |
|
MD5 | d364082d8a34ac1652f1c16f6eed0c88 |
|
BLAKE2b-256 | f595fae6b0759c38fe312abc0c47b407d1d6ac748fa8f4d28c6931a4a925ebdd |