8

I am getting the following error after attempting to read in an xlsx file, write it to a dataframe using feather, then read in that same dataframe using feather and display the results using df.head()

import pandas as pd
import feather
v = pd.__version__
#--- read in excel data

in_path = '/Users/me/Documents/python/data/FGS2000-2015.xlsx'
out_path = '/Users/me/Documents/python/data/mydata.feather'
df = pd.read_excel(in_path)

#--- write pandas dataframe to disk
feather.write_dataframe(df,out_path)

#--- read dataframe from disk
data = feather.read_dataframe(out_path)
data.head()

'module' object has no attribute 'write_dataframe' error.

yoshiserry
  • 20,175
  • 35
  • 77
  • 104

1 Answers1

5

I had the same issue. I was able to fix it by doing:

pip install feather-format

Instead of:

pip install feather
  • 1
    Worked for me, but I had to restart pyCharm for changes to take effect (I didnt have to restart after pipping feather, but had to restart after re-pipping feather-format) – mvishnu Sep 18 '17 at 11:30