jorisvandenbossche commented on issue #43298:
URL: https://github.com/apache/arrow/issues/43298#issuecomment-2441268379

   In general Arrow does not support a mixed type object column from pandas. 
PyArrow will try to infer the type for an object-dtype column (e.g. it it 
contains all strings, the conversion will work fine), but in the example case 
in the top post, it is a mix of strings and integer. 
   Such a mix will fail by default, and possible workarounds are first casting 
everything to strings (to ensure a consistent type), or in theory one could 
also use the Arrow `union` type (which does allow storing mixed types in a 
single column, https://arrow.apache.org/docs/dev/python/data.html#union-arrays. 
However, conversion from pandas to pyarrow is not supported for union, so one 
would have to do the conversion more manually as shown in the link)


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