Skip to content
Open
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
13 changes: 11 additions & 2 deletions pandas/core/interchange/from_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,13 @@ def from_dataframe(df, allow_copy: bool = True) -> pd.DataFrame:
Parameters
----------
df : DataFrameXchg
df : DataFrame
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is DataFrame intended to mean here? Throughout the docs, it means a pandas DataFrame, which isn't appropriate here since the purpose of this function is to convert other DataFrames.

#63111 (comment)

I'd also be fine just documenting this function as deprecated and leaving it as-is until removal.

Object supporting the interchange protocol, i.e. `__dataframe__` method.
.. deprecated:: 3.0
The ``DataFrameXchg`` type hint is deprecated.
Use ``DataFrame`` from the interchange protocol instead.
allow_copy : bool, default: True
Whether to allow copying the memory to perform the conversion
(if false then zero-copy approach is requested).
Expand Down Expand Up @@ -142,8 +147,12 @@ def _from_dataframe(df: DataFrameXchg, allow_copy: bool = True) -> pd.DataFrame:
Parameters
----------
df : DataFrameXchg
df : DataFrame
Object supporting the interchange protocol, i.e. `__dataframe__` method.
.. deprecated:: 3.0
The ``DataFrameXchg`` type hint is deprecated.
allow_copy : bool, default: True
Whether to allow copying the memory to perform the conversion
(if false then zero-copy approach is requested).
Expand Down
Loading