You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2019/11/05 13:29:00 UTC
[jira] [Resolved] (ARROW-7023) [Python] pa.array does not use
"from_pandas" semantics for pd.Index
[ https://issues.apache.org/jira/browse/ARROW-7023?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joris Van den Bossche resolved ARROW-7023.
------------------------------------------
Resolution: Fixed
Issue resolved by pull request 5753
[https://github.com/apache/arrow/pull/5753]
> [Python] pa.array does not use "from_pandas" semantics for pd.Index
> -------------------------------------------------------------------
>
> Key: ARROW-7023
> URL: https://issues.apache.org/jira/browse/ARROW-7023
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Reporter: Joris Van den Bossche
> Assignee: Joris Van den Bossche
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.0.0
>
>
> {code}
> In [15]: idx = pd.Index([1, 2, np.nan], dtype=object)
> In [16]: pa.array(idx)
> Out[16]:
> <pyarrow.lib.DoubleArray object at 0x7f2e24300780>
> [
> 1,
> 2,
> nan
> ]
> In [17]: pa.array(idx, from_pandas=True)
> Out[17]:
> <pyarrow.lib.Int64Array object at 0x7f2e242d3678>
> [
> 1,
> 2,
> null
> ]
> In [18]: pa.array(pd.Series(idx))
> Out[18]:
> <pyarrow.lib.Int64Array object at 0x7f2e242d3780>
> [
> 1,
> 2,
> null
> ]
> {code}
> We should probably handle Series and Index the same in this regard.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)