jorisvandenbossche commented on code in PR #36314:
URL: https://github.com/apache/arrow/pull/36314#discussion_r1246417026
##########
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:
Currently we are indeed passing down `self.storage`, but I seem to remember
that we added similar logic to the underlying C++ ConvertArrayToPandas to also
(by default) use the storage array to do the actual conversion. So it _might_
actually work by just removing the overridden method completely.
--
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]