Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Aug 13, 2024
1 parent f14f7ea commit c738f7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions narwhals/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,11 @@ def __arrow_c_stream__(self, requested_schema: object | None = None) -> object:
"""
Export a DataFrame via the Arrow PyCapsule Interface.
Narwhals doesn't implement anything itself here - if the underlying dataframe
implements the interface, it'll return that, else you'll get an `AttributeError`.
- if the underlying dataframe implements the interface, it'll return that
- else, it'll call `to_arrow` and then defer to PyArrow's implementation
https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html
See [PyCapsule Interface](https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html)
for more.
"""
native_frame = self._compliant_frame._native_frame
if hasattr(native_frame, "__arrow_c_stream__"):
Expand Down
3 changes: 2 additions & 1 deletion narwhals/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def __arrow_c_stream__(self, requested_schema: object | None = None) -> object:
- if the underlying series implements the interface, it'll return that
- else, it'll call `to_arrow` and then defer to PyArrow's implementation
https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html
See [PyCapsule Interface](https://arrow.apache.org/docs/dev/format/CDataInterface/PyCapsuleInterface.html)
for more.
"""
native_series = self._compliant_series._native_series
if hasattr(native_series, "__arrow_c_stream__"):
Expand Down

0 comments on commit c738f7f

Please sign in to comment.