raulcd commented on code in PR #49247:
URL: https://github.com/apache/arrow/pull/49247#discussion_r3020437852


##########
python/pyarrow/array.pxi:
##########
@@ -2276,6 +2276,13 @@ cdef _array_like_to_pandas(obj, options, types_mapper):
             dtype = original_type.to_pandas_dtype()
         except NotImplementedError:
             pass
+    elif pandas_api.uses_string_dtype() and not 
options["strings_to_categorical"] and (
+        original_type.id == _Type_STRING or
+        original_type.id == _Type_LARGE_STRING or
+        original_type.id == _Type_STRING_VIEW
+    ):
+        # for pandas 3.0+, use pandas' new default string dtyp

Review Comment:
   ```suggestion
           # for pandas 3.0+, use pandas' new default string dtype
   ```



##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -2975,7 +2975,9 @@ def check_zero_copy_failure(self, arr):
             arr.to_pandas(zero_copy_only=True)
 
     def test_zero_copy_failure_on_object_types(self):
-        self.check_zero_copy_failure(pa.array(['A', 'B', 'C']))
+        if Version(pd.__version__) < Version("3.0.0"):
+            # pandas 3.0 includes default string dtype support

Review Comment:
   ~I am not sure I understand why this test has to have this guard now. Isn't 
it supposed to work with pandas > 3.0.0?~
   I suppose this is because we are testing object types specifically. Was this 
test failing on CI? I haven't seen the failure.



-- 
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