You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2023/06/28 09:37:46 UTC

[GitHub] [arrow] jorisvandenbossche commented on a diff in pull request #36314: GH-36096: [Python] Call __from_arrow__ in Array.to_pandas

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


##########
python/pyarrow/array.pxi:
##########
@@ -1475,6 +1475,17 @@ cdef class Array(_PandasConvertible):
         return self.take(indices)
 
     def _to_pandas(self, options, types_mapper=None, **kwargs):
+        pandas_dtype = None
+        try:
+            pandas_dtype = self.type.to_pandas_dtype()

Review Comment:
   Something that we should also do the the other places where this logic lives (eg ChunkedArray._to_pandas), but I think we should give precedence to `types_mapper`, if specified. Because as a user, if you specify that keyword, you want to be able to override the default conversion.  



-- 
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-unsubscribe@arrow.apache.org

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