danepitkin commented on code in PR #36314:
URL: https://github.com/apache/arrow/pull/36314#discussion_r1246903039
##########
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:
Looks like you are right!
https://github.com/apache/arrow/blob/0cea12ffc87915e3808d153d4d8e5f115e48d487/python/pyarrow/src/arrow/python/arrow_to_pandas.cc#L2457
Running pytests locally seems to agree as well. I'll run the integration
tests with this change to verify.
--
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]