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
Suggesting a workaround:
line to be replaced in the notebook: pd.read_feather(’/home/hamede/fastai/data/tmp/bulldozers-raw’)
replacement lines:
import feather
feather.read_dataframe(’/home/hamede/fastai/data/tmp/bulldozers-raw’)
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.
Hi,
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
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
Confirm it works for pyarrow 0.10.0 (not 0.9.0) and pandas 0.23.4. Just
pip install pyarrow==0.10
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.
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
This worked for me too. Thanks
Thanks. This fixed the problem.
Still seeing this problem, and I have the latest versions of pandas and pyarrow:
>>> import pandas
>>> pandas.__version__
'0.23.4'
>>> import pyarrow
>>> pyarrow.__version__
'0.14.0'
>>> pandas.read_feather('iris.fth')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/.local/lib/python3.6/site-packages/pandas/io/feather_format.py", line 112, in read_feather
return feather.read_dataframe(path, nthreads=nthreads)
TypeError: read_feather() got an unexpected keyword argument 'nthreads'
>>>
>>> import feather
>>> feather.__version__
'0.4.0'
>>> feather.read_dataframe('iris.fth').head()
sepal_length sepal_width petal_length petal_width species
0 5.1 3.5 1.4 0.2 setosa
1 4.9 3.0 1.4 0.2 setosa
2 4.7 3.2 1.3 0.2 setosa
3 4.6 3.1 1.5 0.2 setosa
4 5.0 3.6 1.4 0.2 setosa
Downgrading pyarrow to 0.10.0 seems to fix it, but as you can see the problem is back with later versions.
As suggested above following resolved the issue:
!{sys.executable} -m pip install pyarrow==0.10.0
I also got the below warning (‘nthreads’ is deprecated and to use ‘use_threads’ instead)
/home/user/anaconda3/envs/fastai/lib/python3.6/site-packages/pandas/io/feather_format.py:112: FutureWarning: `nthreads` argument is deprecated, pass `use_threads` instead
return feather.read_dataframe(path, nthreads=nthreads)