Skip to content

Commit b14bf93

Browse files
lookup array if applicable
1 parent 39a3bf3 commit b14bf93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/arrays/categorical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def __init__(
449449
if isinstance(values.dtype, ArrowDtype) and issubclass(
450450
values.dtype.type, CategoricalDtypeType
451451
):
452-
arr = values._pa_array.combine_chunks()
452+
arr = getattr(values, "array", values)._pa_array.combine_chunks()
453453
categories = arr.dictionary.to_pandas(types_mapper=ArrowDtype)
454454
codes = arr.indices.to_numpy()
455455
dtype = CategoricalDtype(categories, values.dtype.pyarrow_dtype.ordered)

0 commit comments

Comments
 (0)