Skip to content

Commit 9e57d6d

Browse files
committed
fix column_arrays for array manager
1 parent d228a78 commit 9e57d6d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pandas/core/internals/array_manager.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,14 @@ def column_arrays(self) -> list[ArrayLike]:
794794
"""
795795
Used in the JSON C code to access column arrays.
796796
"""
797-
return self.arrays
797+
798+
def convert_array(arr: ArrayLike) -> ArrayLike:
799+
if isinstance(arr, ExtensionArray):
800+
return arr.to_numpy()
801+
else:
802+
return arr
803+
804+
return [convert_array(arr) for arr in self.arrays]
798805

799806
def iset(
800807
self, loc: int | slice | np.ndarray, value: ArrayLike, inplace: bool = False

0 commit comments

Comments
 (0)