0

So looking at the docs for write_feather I should be able to write an Arrow table as follows.

import pyarrow as pa
import pyarrow.feather as fe


fe.write_feather(
  pa.Table.from_arrays([ pa.array([1,2,3]) ], names=['value']), 'file.feather'
)

But I'm getting the following error:

  File "pyarrow/feather.py", line 89, in write
    if not df.columns.is_unique:
AttributeError: 'list' object has no attribute 'is_unique'

Parquet files seem to write as expected, so I'm thinking there might be a bug in Feather. Any thoughts?

fny
  • 31,255
  • 16
  • 96
  • 127

1 Answers1

2

The problem here is that pyarrow.feather.write_feather expects a pandas.DataFrame and not a pyarrow.Table in the version of pyarrow you are using. If you directly want to write a pyarrow.Table, you need to upgrade to a more recent version as this support was only recently added.

Uwe L. Korn
  • 8,080
  • 1
  • 30
  • 42