Skip to content

Commit 2206e5c

Browse files
use extract_array
1 parent b14bf93 commit 2206e5c

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 = getattr(values, "array", values)._pa_array.combine_chunks()
452+
arr = extract_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)