我尝试将数据存储为羽毛格式,但是在加载时我得到了错误。
os.makedirs('tmp', exist_ok=True)
df_hist.to_feather('tmp/historical-raw')这是加载数据集的过程
df_hist= pd.read_feather('tmp/historical-raw'),这将产生以下错误
read_feather() got an unexpected keyword argument 'nthreads'提前感谢
发布于 2019-01-02 09:51:09
试着更换下面的线路
df_hist= pd.read_feather('tmp/historical-raw') 使用
import feather
df_hist=feather.read_dataframe('tmp/historical-raw')以上的变化对我起了作用。
发布于 2019-01-10 07:25:30
read_feather函数如下:
feather = _try_import()
path = _stringify_path(path)
if feather.__version__ < LooseVersion('0.4.0'):
return feather.read_dataframe(path)
return feather.read_dataframe(path, nthreads=nthreads)read_feather函数调用feather.read_dataframe内转。您可以导入羽毛并直接调用feather.read_dataframe('path')。
import feather
feather.read_dataframe(path)https://stackoverflow.com/questions/53995927
复制相似问题