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.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 830c35cffdf87a6bb3c18167208ba6f39f32017837575056fe727eeba465300a |
|
MD5 | 5f58281875e891f35e8999e5eb085c5d |
|
BLAKE2b-256 | 77c5d2eaf20bbe8725495f4962d7b298a89252f73aa0613b53a5b331b9b887cc |
Hashes for dataframe_api_compat-0.1.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4b6ef18cc7948c1ad07ff813ef9deabd325bfec4a6ee1eda449f5ececa571cd |
|
MD5 | aaf9ffdf01e9fe73c80bea494faf766f |
|
BLAKE2b-256 | ec4ce277c881586c192e058b1143a7bcfbba834bffa260916b8dd680df928639 |