You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mikelui (via GitHub)" <gi...@apache.org> on 2023/04/15 14:30:49 UTC

[GitHub] [arrow] mikelui commented on a diff in pull request #34730: GH-34729: [C++][Python] Enhanced Arrow<->Pandas map/pydict support

mikelui commented on code in PR #34730:
URL: https://github.com/apache/arrow/pull/34730#discussion_r1167555579


##########
python/pyarrow/src/arrow/python/arrow_to_pandas.cc:
##########
@@ -911,6 +877,122 @@ Status ConvertMap(PandasOptions options, const ChunkedArray& data,
   return Status::OK();
 }
 
+// A more helpful error message around TypeErrors that may stem from unhashable keys
+Status CheckMapAsPydictsError() {

Review Comment:
   Manually tested this by remove the `with pytest.raises(TypeError):` in my non-hashable key test, and got:
   
   ```
   E   TypeError: unhashable type: 'numpy.ndarray'. If keys are not hashable, then you must use `maps_as_pydicts=False`
   ```



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org