You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/05/27 03:33:00 UTC
[jira] [Updated] (ARROW-8314) [Python] Provide a method to select a
subset of columns of a Table
[ https://issues.apache.org/jira/browse/ARROW-8314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-8314:
----------------------------------
Labels: pull-request-available (was: )
> [Python] Provide a method to select a subset of columns of a Table
> ------------------------------------------------------------------
>
> Key: ARROW-8314
> URL: https://issues.apache.org/jira/browse/ARROW-8314
> Project: Apache Arrow
> Issue Type: New Feature
> Components: Python
> Reporter: Joris Van den Bossche
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> I looked through the open issues and in our API, but didn't directly find something about selecting a subset of columns of a table.
> Assume you have a table like:
> {code}
> table = pa.table({'a': [1, 2], 'b': [.1, .2], 'c': ['a', 'b']})
> {code}
> You can select a single column with {{table.column('a')}} or {{table['a']}} to get a chunked array. You can add, append, remove and replace columns (with {{add_column}}, {{append_column}}, {{remove_column}}, {{set_column}}).
> But an easy way to get a subset of the columns (without the manuall removing the ones you don't want one by one) doesn't seem possible.
> I would propose something like:
> {code}
> table.select(['a', 'c'])
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)