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


##########
python/pyarrow/pandas_compat.py:
##########
@@ -646,10 +646,13 @@ def convert_column(col, field):
                              f"had {result.null_count} null values")
         return result
 
-    def _can_definitely_zero_copy(arr):
-        return (isinstance(arr, np.ndarray) and
-                arr.flags.contiguous and
-                issubclass(arr.dtype.type, np.integer))
+    def _can_definitely_zero_copy(ser):
+        if isinstance(ser.dtype, np.dtype):
+            arr = ser.values

Review Comment:
   Yes, that is correct



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