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.
I had the same issue. I was able to fix it by doing:
pip install feather-format
Instead of:
pip install feather
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With