[
https://issues.apache.org/jira/browse/ARROW-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rok Mihevc updated ARROW-2148:
------------------------------
External issue URL: https://github.com/apache/arrow/issues/18115
> [Python] to_pandas() on struct array returns object array
> ---------------------------------------------------------
>
> Key: ARROW-2148
> URL: https://issues.apache.org/jira/browse/ARROW-2148
> Project: Apache Arrow
> Issue Type: Bug
> Reporter: Antoine Pitrou
> Priority: Major
>
> This should probably return a Numpy struct array instead:
> {code:python}
> >>> arr = pa.array([{'a': 1, 'b': 2.5}, {'a': 2, 'b': 3.5}],
> >>> type=pa.struct([pa.field('a', pa.int32()), pa.field('b', pa.float64())]))
> >>> arr.type
> StructType(struct<a: int32, b: double>)
> >>> arr.to_pandas()
> array([{'a': 1, 'b': 2.5}, {'a': 2, 'b': 3.5}], dtype=object)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)