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


##########
python/pyarrow/array.pxi:
##########
@@ -3104,12 +3109,18 @@ cdef class ExtensionArray(Array):
 
     def _to_pandas(self, options, **kwargs):
         pandas_dtype = None
-        try:
-            pandas_dtype = self.type.to_pandas_dtype()
-        except NotImplementedError:
-            pass
+        types_mapper = kwargs.get('types_mapper', None)
+
+        if types_mapper:
+            pandas_dtype = types_mapper(self.type)
+        elif issubclass(type(self.type), ExtensionType):

Review Comment:
   The only difference here now is calling `self.type.to_pandas_dtype()` vs 
`self.storage.type.to_pandas_dtype()` when checking if `__from_arrow__` attr 
exists(storage gets passed to the base Array function). 



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to