[
https://issues.apache.org/jira/browse/ARROW-4867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rok Mihevc updated ARROW-4867:
------------------------------
External issue URL: https://github.com/apache/arrow/issues/21377
> [Python] Table.from_pandas() column order not respected
> -------------------------------------------------------
>
> Key: ARROW-4867
> URL: https://issues.apache.org/jira/browse/ARROW-4867
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.12.1
> Reporter: Andreas
> Assignee: Wes McKinney
> Priority: Minor
> Labels: pull-request-available
> Fix For: 0.13.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Starting with 0.12, the order of the columns in {{Table.from_pandas}} is no
> longer identical to the order of the colums given in the {{columns}}
> argument. This used to be the case in previous versions.
> 0.12:
> {code:java}
> In [1]: pyarrow.Table.from_pandas(pd.DataFrame(dict(a=[1],b=[2])),
> columns=['b', 'a'])
> Out[1]:
> pyarrow.Table
> a: int64
> b: int64{code}
> 0.11:
> {code:java}
> In [1]: pyarrow.Table.from_pandas(pd.DataFrame(dict(a=[1],b=[2])),
> columns=['b', 'a'])
> Out[1]:
> pyarrow.Table
> b: int64
> a: int64{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)