You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pyarrow
import pandas
a = pandas.SparseDataFrame({'A': [1, 2, 3], 'B': [4, 5, 6], 'C': [7, 8, 9]})
pyarrow.deserialize(pyarrow.serialize(a).to_buffer())
Traceback (most recent call last):
File "", line 1, in
File "serialization.pxi", line 441, in pyarrow.lib.deserialize
File "serialization.pxi", line 404, in pyarrow.lib.deserialize_from
File "serialization.pxi", line 257, in pyarrow.lib.SerializedPyObject.deserialize
File "serialization.pxi", line 174, in pyarrow.lib.SerializationContext._deserialize_callback
File ".../.virtualenv/arrow/lib/python3.6/site-packages/pyarrow/serialization.py", line 77, in _deserialize_pandas_dataframe
return pdcompat.serialized_dict_to_dataframe(data)
File ".../.virtualenv/arrow/lib/python3.6/site-packages/pyarrow/pandas_compat.py", line 450, in serialized_dict_to_dataframe
for block in data['blocks']]
File ".../.virtualenv/arrow/lib/python3.6/site-packages/pyarrow/pandas_compat.py", line 450, in
for block in data['blocks']]
File ".../.virtualenv/arrow/lib/python3.6/site-packages/pyarrow/pandas_compat.py", line 478, in _reconstruct_block
block = _int.make_block(block_arr, placement=placement)
File ".../.virtualenv/arrow/lib/python3.6/site-packages/pandas/core/internals.py", line 2957, in make_block
return klass(values, ndim=ndim, fastpath=fastpath, placement=placement)
File ".../.virtualenv/arrow/lib/python3.6/site-packages/pandas/core/internals.py", line 120, in init
len(self.mgr_locs)))
ValueError: Wrong number of items passed 3, placement implies 1
Yes, it is still there. SparseDataFrame is naive implementation and has many bugs. I've spent a lot of time to fix these, but it is hard to fix all. IMO, this is not the right time to support SparseDataFrame in pyarrow.
Reporter: Mitar / @mitar
Assignee: Licht Takeuchi / @Licht-T
PRs and other links:
Note: This issue was originally created as ARROW-2273. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: