You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/02/13 13:23:02 UTC
[jira] [Created] (ARROW-2148) [Python] to_pandas() on struct array
returns object array
Antoine Pitrou created ARROW-2148:
-------------------------------------
Summary: [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
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
(v7.6.3#76005)