Skip to content

DOC: warn about when to not use the interchange protocol #59322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,14 @@ def __dataframe__(
"""
Return the dataframe interchange object implementing the interchange protocol.

.. warning::

Due to severe implementation issues, we recommend only considering using the
interchange protocol in the following cases:

- converting to pandas: for pandas >= 2.0.3
- converting from pandas: for pandas >= 3.0.0

Parameters
----------
nan_as_null : bool, default False
Expand Down
8 changes: 8 additions & 0 deletions pandas/core/interchange/from_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ def from_dataframe(df, allow_copy: bool = True) -> pd.DataFrame:
"""
Build a ``pd.DataFrame`` from any DataFrame supporting the interchange protocol.

.. warning::

Due to severe implementation issues, we recommend only considering using the
interchange protocol in the following cases:

- converting to pandas: for pandas >= 2.0.3
- converting from pandas: for pandas >= 3.0.0

Parameters
----------
df : DataFrameXchg
Expand Down
Loading