Read_feather() function error

I tried running the below code


I get the below error

TypeError                                 Traceback (most recent call last)
<ipython-input-83-11476d87a470> in <module>()
----> 1 pd.read_feather('/home/hamede/fastai/data/tmp/bulldozers-raw')

~/anaconda3/envs/fastai/lib/python3.6/site-packages/pandas/io/ in read_feather(path, nthreads)
    110         return feather.read_dataframe(path)
--> 112     return feather.read_dataframe(path, nthreads=nthreads)

TypeError: read_feather() got an unexpected keyword argument 'nthreads'

I tried reinstallting feather-format using pip even tried it using conda but I still get the same error


because it says “unexpected argument” it is pretty likely that you have a too old version of pandas installed. This argument was added only in version 0.21.

you can check your pandas version in the jupyter notebook using:

1 Like

Hey ! Thanks a lot it fixed my issue.

I faced the same error, but it persisted even after I upgraded pandas. A brief search uncovered this github report, indicating that pyarrow 0.11.0 may be the culprit. So, if upgrading pandas does not work, try
!{sys.executable} -m pip install pyarrow==0.10.0

After downgrading pyarrow, my Jupyter notebook could read the feather format again.

I’m having the same issue. Still broken for me. Pandas version 23.4 and i’ve tried pyarrow 0.11.0, pyarrow 0.10.0 and pyarrow 0.09.0

update: working config pandas 0.23.0 and pyarrow 0.09

1 Like

Suggesting a workaround:
line to be replaced in the notebook: pd.read_feather(’/home/hamede/fastai/data/tmp/bulldozers-raw’)
replacement lines:
import feather


Thanks for this! Workaround did the trick for me without needing to mess around with different versions of packages.

Hi Everyone,
my pandas version is 0.22 and pyarrow is 0.10.0 still I am facing the below issue,
NameError: name ‘six’ is not defined

I tried both pd.read_feathers() and feather.read_dataframe(). In both the cases I am facing the same issue.

1 Like

I was also facing similar problem. Try to upgrade the pandas version to 0.23.4 and as you already updated the pyarrow. So, now just restart your kernel. Hopefully, it will work.

Hi Sanket,
It worked with upgrade and reload of jupyter notebook.
Thanks much :slight_smile:

This issue will likely be fixed by the next release of pandas. In the meantime the simplest solution is to add this line to the bottom of the environment.yml file in the root of the fastai repository (prefixed with two spaces) and then run conda env update:

  - pyarrow==0.10.0
1 Like

Confirm it works for pyarrow 0.10.0 (not 0.9.0) and pandas 0.23.4. Just

pip install pyarrow==0.10

1 Like

I also got this error. I am using Google Colab. Anyone got it working in Google Colab? I have tried the other workarounds mentioned in this thread but ran into other errors.

1 Like

This works in Colab also

You are right. It worked for me. Thanks.

Maybe we need requirement.txt in these lessons, so we can restore the same version when these notebooks were run successfully.

great stuff, thanks!

I’m using Google Colab and changed to this code

import feather
df_raw = feather.read_dataframe('tmp/bulldozers-raw')
# Fresh up `pandas` to 0.24 (for feather format 0.4).
# If you don't want to update `pandas` use workaround:
#  import feather
#  df_raw = feather.read_dataframe('tmp/bulldozers-raw')
!pip install pandas -U -q

What exactly is a feather-format? Why isn’t it being used by everyone if it is so easy to save data in a feather?