diff --git a/python/pyarrow/array.pxi b/python/pyarrow/array.pxi index 9413866e30c18..715c0aced65f2 100644 --- a/python/pyarrow/array.pxi +++ b/python/pyarrow/array.pxi @@ -1685,10 +1685,9 @@ cdef wrap_array_output(PyObject* output): cdef object obj = PyObject_to_object(output) if isinstance(obj, dict): - return pandas_api.categorical_type(obj['indices'], - categories=obj['dictionary'], - ordered=obj['ordered'], - fastpath=True) + return _pandas_api.categorical_type.from_codes( + obj['indices'], categories=obj['dictionary'], ordered=obj['ordered'] + ) else: return obj