[
https://issues.apache.org/jira/browse/ARROW-2311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659338#comment-17659338
]
Rok Mihevc commented on ARROW-2311:
-----------------------------------
This issue has been migrated to [issue
#18263|https://github.com/apache/arrow/issues/18263] on GitHub. Please see the
[migration documentation|https://github.com/apache/arrow/issues/14542] for
further details.
> [Python] Struct array slicing defective
> ---------------------------------------
>
> Key: ARROW-2311
> URL: https://issues.apache.org/jira/browse/ARROW-2311
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Affects Versions: 0.8.0
> Reporter: Antoine Pitrou
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.9.0
>
>
> {code:python}
> >>> arr = pa.array([(1, 2.0), (3, 4.0), (5, 6.0)],
> >>> type=pa.struct([pa.field('x', pa.int16()), pa.field('y', pa.float32())]))
> >>> arr
> <pyarrow.lib.StructArray object at 0x7fdfbe7916d8>
> [
> {'x': 1, 'y': 2.0},
> {'x': 3, 'y': 4.0},
> {'x': 5, 'y': 6.0}
> ]
> >>> arr[1:]
> <pyarrow.lib.StructArray object at 0x7fdfbe791f48>
> [
> {'x': 1, 'y': 2.0},
> {'x': 3, 'y': 4.0}
> ]
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)