[ 
https://issues.apache.org/jira/browse/ARROW-16611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17539066#comment-17539066
 ] 

Antoine Pitrou commented on ARROW-16611:
----------------------------------------

Also, did it work with previous versions of PyArrow? I don't think so.

> [Python] MapArray pandas round trip is broken
> ---------------------------------------------
>
>                 Key: ARROW-16611
>                 URL: https://issues.apache.org/jira/browse/ARROW-16611
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 8.0.0
>            Reporter: Robbie Gruener
>            Priority: Major
>
> pyarrow.MapArray when converted to pandas cannot be successfully converted 
> back.
> The following snipper does not work:
>  
> ```
> import pyarrow as pa
> data = [[('x', 1), ('y', 0)], [('a', 2), ('b', 45)]]
> ty = pa.map_(pa.string(), pa.int64())
> map_col = pa.array(data, type=ty)
> pa.MapArray.from_pandas(map_col.to_pandas())
> ```
> `Uncaught exception: ArrowTypeError: Expected bytes, got a 'int' object 
> (java.lang.RuntimeException)`



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to