Skip to content

Commit 0be983b

Browse files
authored
DOC: warn about when to not use the interchange protocol (#59322)
docs: warn about when to not use the interchange protocol
1 parent e6c292e commit 0be983b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

pandas/core/frame.py

+8
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,14 @@ def __dataframe__(
901901
"""
902902
Return the dataframe interchange object implementing the interchange protocol.
903903
904+
.. warning::
905+
906+
Due to severe implementation issues, we recommend only considering using the
907+
interchange protocol in the following cases:
908+
909+
- converting to pandas: for pandas >= 2.0.3
910+
- converting from pandas: for pandas >= 3.0.0
911+
904912
Parameters
905913
----------
906914
nan_as_null : bool, default False

pandas/core/interchange/from_dataframe.py

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ def from_dataframe(df, allow_copy: bool = True) -> pd.DataFrame:
3636
"""
3737
Build a ``pd.DataFrame`` from any DataFrame supporting the interchange protocol.
3838
39+
.. warning::
40+
41+
Due to severe implementation issues, we recommend only considering using the
42+
interchange protocol in the following cases:
43+
44+
- converting to pandas: for pandas >= 2.0.3
45+
- converting from pandas: for pandas >= 3.0.0
46+
3947
Parameters
4048
----------
4149
df : DataFrameXchg

0 commit comments

Comments
 (0)