You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Stephen Gowdy (Jira)" <ji...@apache.org> on 2021/02/20 20:51:00 UTC
[jira] [Commented] (ARROW-6414) [Python] 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:comment-tabpanel&focusedCommentId=17287799#comment-17287799 ]
Stephen Gowdy commented on ARROW-6414:
--------------------------------------
What are the replacements?
> [Python] 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: Stephen 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.4#803005)