You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Stpehen Gowdy (Jira)" <ji...@apache.org> on 2019/09/02 15:05:00 UTC

[jira] [Updated] (ARROW-6414) pyarrow cannot (de)serialise an empty MultiIndex-ed column DataFrame

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

Stpehen Gowdy updated ARROW-6414:
---------------------------------
    Description: 
If you have an empty multiindex columns in a pandas dataframe pyarrow cannot serialise and deserialise it. Example code is below to show this.

{code:python}
import pandas as pd
import pyarrow as pa
columns = pd.MultiIndex.from_tuples([('a', 'b', 'c')])
df = pd.DataFrame(columns = columns)
df = df[[]]
pa.deserialize_pandas(pa.serialize_pandas(df).to_pybytes())
...
AttributeError: 'dict' object has no attribute 'dtype'
{code}


  was:
If you have an empty multiindex columns in a pandas dataframe pyarrow cannot serialise an deserialise it. Example code is below to show this.

{code:python}
import pandas as pd
import pyarrow as pa
columns = pd.MultiIndex.from_tuples([('a', 'b', 'c')])
df = pd.DataFrame(columns = columns)
df = df[[]]
pa.deserialize_pandas(pa.serialize_pandas(df).to_pybytes())
...
AttributeError: 'dict' object has no attribute 'dtype'
{code}



> pyarrow cannot (de)serialise an empty MultiIndex-ed column DataFrame
> --------------------------------------------------------------------
>
>                 Key: ARROW-6414
>                 URL: https://issues.apache.org/jira/browse/ARROW-6414
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.14.0
>            Reporter: Stpehen Gowdy
>            Priority: Major
>
> If you have an empty multiindex columns in a pandas dataframe pyarrow cannot serialise and deserialise it. Example code is below to show this.
> {code:python}
> import pandas as pd
> import pyarrow as pa
> columns = pd.MultiIndex.from_tuples([('a', 'b', 'c')])
> df = pd.DataFrame(columns = columns)
> df = df[[]]
> pa.deserialize_pandas(pa.serialize_pandas(df).to_pybytes())
> ...
> AttributeError: 'dict' object has no attribute 'dtype'
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)