I need to load a feather file in python
, preferably with pandas
, so I tried to use read_feather
, but came across the error
/pandas/io/feather_format.py", line 21, in _try_import
raise ImportError("pyarrow is not installed\n\n"
And indeed, the codebase I am working in does not have pyarrow
integrated. When reading https://pandas.pydata.org/docs/reference/api/pandas.read_feather.html, it appears pyarrow
is needed for certain dtype
backends, but I am using the default
settings so I am not sure why it is needed.
We cannot
read_feather
withoutpyarrow
package becausefeather IO
functionality that is used in pandas is implemented inpyarrow
, and thus pandas needs that library to be able to read or write feather files.Even for
dtype_backend == "numpy_nullable"
Link to source code: https://github.com/pandas-dev/pandas/blob/v2.1.3/pandas/io/feather_format.py#L72-L148