import pandas as pd
df = pd.DataFrame({'a' : [1,2,3]})
df.to_hdf('temp.h5', key='df', mode='w')
-
这给了我错误。
缺少可选的依赖项“表”。使用 pip 或 conda 安装表。
我已经尝试过了ImportError HDFStore 需要 PyTables 没有名为表的模块 https://stackoverflow.com/questions/25980018/importerror-hdfstore-requires-pytables-no-module-named-tables。还是同样的错误。
读取 hdf 文件时出现同样的错误。和tables
已经为我的 python 安装了。
一些版本信息。
PS:您可以在以下位置重现此内容repl
https://repl.it/ https://repl.it/.
Update:
import tables
并得到这个错误:
ImportError: 无法加载任何 ['hdf5.dll', 'hdf5dll.dll'],请确保可以在系统路径中找到它。
对于 conda 用户:
conda install pytables
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)