Skip to content

Commit ad52416

Browse files
DOC: more exchange -> interchange renames (#47940)
1 parent 4a961b1 commit ad52416

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

doc/source/whatsnew/v1.5.0.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ including other versions of pandas.
1414
Enhancements
1515
~~~~~~~~~~~~
1616

17-
.. _whatsnew_150.enhancements.dataframe_exchange:
17+
.. _whatsnew_150.enhancements.dataframe_interchange:
1818

19-
DataFrame exchange protocol implementation
20-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19+
DataFrame interchange protocol implementation
20+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2121

22-
Pandas now implement the DataFrame exchange API spec.
22+
Pandas now implement the DataFrame interchange API spec.
2323
See the full details on the API at https://data-apis.org/dataframe-protocol/latest/index.html
2424

2525
The protocol consists of two parts:
2626

27-
- New method :meth:`DataFrame.__dataframe__` which produces the exchange object.
28-
It effectively "exports" the Pandas dataframe as an exchange object so
29-
any other library which has the protocol implemented can "import" that dataframe
30-
without knowing anything about the producer except that it makes an exchange object.
31-
- New function :func:`pandas.api.exchange.from_dataframe` which can take
32-
an arbitrary exchange object from any conformant library and construct a
33-
Pandas DataFrame out of it.
27+
- New method :meth:`DataFrame.__dataframe__` which produces the interchange object.
28+
It effectively "exports" the pandas dataframe as an interchange object so
29+
any other library which has the protocol implemented can "import" that dataframe
30+
without knowing anything about the producer except that it makes an interchange object.
31+
- New function :func:`pandas.api.interchange.from_dataframe` which can take
32+
an arbitrary interchange object from any conformant library and construct a
33+
pandas DataFrame out of it.
3434

3535
.. _whatsnew_150.enhancements.styler:
3636

pandas/core/interchange/from_dataframe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def protocol_df_chunk_to_pandas(df: DataFrameXchg) -> pd.DataFrame:
131131
buffers.append(buf)
132132

133133
pandas_df = pd.DataFrame(columns)
134-
pandas_df.attrs["_EXCHANGE_PROTOCOL_BUFFERS"] = buffers
134+
pandas_df.attrs["_INTERCHANGE_PROTOCOL_BUFFERS"] = buffers
135135
return pandas_df
136136

137137

pandas/tests/interchange/test_impl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def test_dataframe(data):
8888
expected = from_dataframe(df2.select_columns_by_name(names))
8989
tm.assert_frame_equal(result, expected)
9090

91-
assert isinstance(result.attrs["_EXCHANGE_PROTOCOL_BUFFERS"], list)
92-
assert isinstance(expected.attrs["_EXCHANGE_PROTOCOL_BUFFERS"], list)
91+
assert isinstance(result.attrs["_INTERCHANGE_PROTOCOL_BUFFERS"], list)
92+
assert isinstance(expected.attrs["_INTERCHANGE_PROTOCOL_BUFFERS"], list)
9393

9494

9595
def test_missing_from_masked():

0 commit comments

Comments
 (0)