You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Wes McKinney (JIRA)" <ji...@apache.org> on 2018/10/01 08:59:00 UTC

[jira] [Closed] (ARROW-3374) [Python] Dictionary has out-of-bound index when creating DictionaryArray from Pandas with NaN

     [ https://issues.apache.org/jira/browse/ARROW-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wes McKinney closed ARROW-3374.
-------------------------------
    Resolution: Not A Problem
      Assignee: Wes McKinney

You have to pass {{from_pandas=True}}

{code}
In [4]: pa.array(pd.Categorical(['a', 'b', 'c'], categories=['a', 'b']), from_pandas=True)
Out[4]: 
<pyarrow.lib.DictionaryArray object at 0x7fd2064810a8>

-- dictionary:
  [
    "a",
    "b"
  ]
-- indices:
  [
    0,
    1,
    null
  ]
{code}

> [Python] Dictionary has out-of-bound index when creating DictionaryArray from Pandas with NaN
> ---------------------------------------------------------------------------------------------
>
>                 Key: ARROW-3374
>                 URL: https://issues.apache.org/jira/browse/ARROW-3374
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.10.0
>            Reporter: Keith Kraus
>            Assignee: Wes McKinney
>            Priority: Major
>             Fix For: 0.11.0
>
>
> Minimal reproducer:
> {code:python}
> import pandas as pd
> import pyarrow as pa
> pa.array(pd.Categorical(['a', 'b', 'c'], categories=['a', 'b']))
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)