You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "yu peng (JIRA)" <ji...@apache.org> on 2019/01/24 03:38:00 UTC

[jira] [Created] (ARROW-4350) [python] pyarrow table convert to pandas dataframe add extra information

yu peng created ARROW-4350:
------------------------------

             Summary: [python] pyarrow table convert to pandas dataframe add extra information
                 Key: ARROW-4350
                 URL: https://issues.apache.org/jira/browse/ARROW-4350
             Project: Apache Arrow
          Issue Type: Bug
            Reporter: yu peng


{code:java}
In [19]: df = pd.DataFrame({'a': [[[1], [2]], [[2], [3]]], 'b': [1, 2]})

In [20]: df.iloc[0].to_dict()
Out[20]: {'a': [[1], [2]], 'b': 1}

In [21]: pa.Table.from_pandas(df).to_pandas().iloc[0].to_dict()
Out[21]: {'a': array([array([1]), array([2])], dtype=object), 'b': 1}

In [24]: np.array(df.iloc[0].to_dict()['a']).shape
Out[24]: (2, 1)

In [25]: pa.Table.from_pandas(df).to_pandas().iloc[0].to_dict()['a'].shape
Out[25]: (2,)
{code}
Adding extra array type is not functioning as expected. 

 



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