Tom Augspurger created ARROW-1584: ------------------------------------- Summary: [PYTHON] serialize_pandas on empty dataframe Key: ARROW-1584 URL: https://issues.apache.org/jira/browse/ARROW-1584 Project: Apache Arrow Issue Type: Bug Components: Python Affects Versions: 0.7.0 Reporter: Tom Augspurger Priority: Minor Fix For: 0.8.0
This code {code:python} import pandas as pd import pyarrow as pa pa.serialize_pandas(pd.DataFrame()) {code} Raises {code} --------------------------------------------------------------------------- ArrowNotImplementedError Traceback (most recent call last) <ipython-input-71-ad21add45f0d> in <module>() ----> 1 pa.serialize_pandas(pd.DataFrame()) ~/Envs/dask-dev/lib/python3.6/site-packages/pyarrow/ipc.py in serialize_pandas(df) 158 sink = pa.BufferOutputStream() 159 writer = pa.RecordBatchStreamWriter(sink, batch.schema) --> 160 writer.write_batch(batch) 161 writer.close() 162 return sink.get_result() pyarrow/ipc.pxi in pyarrow.lib._RecordBatchWriter.write_batch (/Users/travis/build/apache/arrow-dist/arrow/python/build/temp.macosx-10.6-intel-3.6/lib.cxx:59238)() pyarrow/error.pxi in pyarrow.lib.check_status (/Users/travis/build/apache/arrow-dist/arrow/python/build/temp.macosx-10.6-intel-3.6/lib.cxx:8113)() ArrowNotImplementedError: Unable to convert type: null {code} Presumably {{pa.deserialize_pandas}} will need a fix as well. -- This message was sent by Atlassian JIRA (v6.4.14#64029)