Skip to content

Commit 76f2e24

Browse files
committed
whats going on with boolean
1 parent 9b0d3bc commit 76f2e24

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pandas/core/interchange/buffer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def bufsize(self) -> int:
115115
"""
116116
Buffer size in bytes.
117117
"""
118-
return self._buffer.size * self._length
118+
return self._buffer.size # * self._length
119119

120120
@property
121121
def ptr(self) -> int:

pandas/core/interchange/column.py

+7
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,13 @@ def _get_data_buffer(
318318
buffer = PandasBufferPyarrow(
319319
arr._pa_array, is_validity=False, allow_copy=self._allow_copy
320320
)
321+
if self.dtype[0] == DtypeKind.BOOL:
322+
dtype = (
323+
DtypeKind.BOOL,
324+
1,
325+
ArrowCTypes.BOOL,
326+
Endianness.NATIVE,
327+
)
321328
return buffer, dtype
322329
if isinstance(self._col.dtype, BaseMaskedDtype):
323330
np_arr = arr._data # type: ignore[attr-defined]

0 commit comments

Comments
 (0)