yos*_*rry 5 python pandas feather
尝试读取xlsx文件后,我收到以下错误,使用feather将其写入数据帧,然后使用feather读取相同的数据帧并使用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()
Run Code Online (Sandbox Code Playgroud)
'module'对象没有属性'write_dataframe'错误.
我遇到过同样的问题。我能够通过执行以下操作来修复它:
pip install feather-format
Run Code Online (Sandbox Code Playgroud)
代替:
pip install feather
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
969 次 |
| 最近记录: |