danepitkin commented on code in PR #36314:
URL: https://github.com/apache/arrow/pull/36314#discussion_r1245843262


##########
python/pyarrow/array.pxi:
##########
@@ -1476,12 +1476,17 @@ cdef class Array(_PandasConvertible):
 
     def _to_pandas(self, options, types_mapper=None, **kwargs):
         pandas_dtype = None
-        try:
-            pandas_dtype = self.type.to_pandas_dtype()
-        except NotImplementedError:
-            pass
 
-        # pandas ExtensionDtype that implements conversion from pyarrow
+        if types_mapper:
+            pandas_dtype = types_mapper(self.type)
+        elif issubclass(type(self.type), ExtensionType):

Review Comment:
   Much cleaner! I'll add to ChunkedArray as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to