jorisvandenbossche commented on code in PR #51167:
URL: https://github.com/apache/arrow/pull/51167#discussion_r4315730132
##########
python/pyarrow/pandas_compat.py:
##########
@@ -902,7 +902,21 @@ def _get_extension_dtypes(table, columns_metadata,
types_mapper, options, catego
if name not in ext_columns and dtype not in
_pandas_supported_numpy_types:
# pandas_dtype is expensive, so avoid doing this for types
# that are certainly numpy dtypes
- pandas_dtype = _pandas_api.pandas_dtype(dtype)
+ try:
+ pandas_dtype = _pandas_api.pandas_dtype(dtype)
+ except TypeError:
Review Comment:
I am fine with adding such a try/except here, but I think the action should
then be a `continue`, i.e. don't treat this column any way specific on the
pyarrow side. IMO we should not just assume the users wants an ArrowDtype
whenever the dtype fails parsing (that can happen for other reasons as well)
--
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]