Skip to content

Commit

Permalink
DOC: warn about when to not use the interchange protocol (#59322)
Browse files Browse the repository at this point in the history
docs: warn about when to not use the interchange protocol
  • Loading branch information
MarcoGorelli authored Jul 26, 2024
1 parent e6c292e commit 0be983b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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

0 comments on commit 0be983b

Please sign in to comment.