You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug, including details regarding any error messages, version, and platform.
Describe the bug, including details regarding any error messages, version, and platform.
pyarrow.interchange.from_dataframe can return incorrect values for columns
whose interchange-protocol dtype uses non-native endianness. The importer
interprets the producer's data buffer as native-endian without accounting for
the endianness field. No error is raised; the values are silently corrupted.
This was reproduced with PyArrow 26.0.0 (development build) on macOS arm64
with Python 3.13.15. The same issue can affect non-native-endian string offset
buffers.
On a little-endian platform, this prints values interpreted with the wrong byte
order, for example:
[16777216, 33554432, 738263040]
Expected behavior
The imported values should preserve the producer's values:
[1, 2, 300]
Proposed fix
Convert non-native-endian data and string offset buffers to native byte order
when copying is allowed. If conversion requires a copy and allow_copy=False,
raise a RuntimeError.
Activity
tam3tamtam commentedon Sep 27, 2026
I would like to work on this issue.
AlenkaF commentedon Nov 25, 2026
Thank you for opening the issue and contributing a fix for it in #51557. Unfortunately the dataframe interchange protocol is not active anymore and we plan to deprecate it in PyArrow, see:
for this reason we do not plan to review any fixes for it.
Are you a user of the implementation? Have you looked into other protocols?