Robbie Gruener created ARROW-16611:
--------------------------------------

             Summary: MapArray pandas round trip is broken
                 Key: ARROW-16611
                 URL: https://issues.apache.org/jira/browse/ARROW-16611
             Project: Apache Arrow
          Issue Type: Bug
    Affects Versions: 8.0.0
            Reporter: Robbie Gruener


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