jrbourbeau commented on code in PR #14080:
URL: https://github.com/apache/arrow/pull/14080#discussion_r970916713


##########
python/pyarrow/pandas_compat.py:
##########
@@ -541,7 +541,7 @@ def dataframe_to_types(df, preserve_index, columns=None):
         if _pandas_api.is_categorical(values):
             type_ = pa.array(c, from_pandas=True).type
         elif _pandas_api.is_extension_array_dtype(values):
-            type_ = pa.array(c.head(0), from_pandas=True).type
+            type_ = pa.array(c[:0], from_pandas=True).type

Review Comment:
   Ah, good catch. Just updated to avoid that deprecation with the `if 
isinstance(c, Series)` check 



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