python - 使用羽化格式包出错

标签 python pandas feather

我在使用羽化格式导出数据时遇到问题。我已经使用安装包:

conda install feather-format -c conda-forge

但是,当我使用 pd.to_feather() 时,我收到一条错误消息,提示我安装软件包(已安装)。

ImportError: the feather-format library is not installed you can install via conda conda install feather-format -c conda-forge or via pip pip install -U feather-format

我也尝试过使用 pyarrow,但我收到另一个错误,说

ImportError: cannot import name 'cpu_count'

你能告诉我我做错了什么吗? 谢谢

最佳答案

Feather 在 pyarrow 模块中找到了新家,因此无需再安装 Feather。

我可以推荐你看看Feather format update: Whence and Whither? ,这解释了为什么并且通常是对更改的一个很好的小走查加上 pyarrow 和遗留 Feather 模块之间的基准 - 有趣的是因为我们都出于性能原因使用该格式:-)

关于python - 使用羽化格式包出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50585491/

相关文章:

python - 在Python中用不同的值更新MySQL的每一行

python - 从对象中的 JMESPath 表达式中提取 key

python - 从 pandas df 中的特定值返回系列

python - 按 Pandas 数据帧的多索引数据中的索引和值排序

python - 将 Feather 存储的 Pandas 数据帧读取到 R 中

python - `pip search` 如何对结果进行排序?

python - pandas:为什么列的 dtype 在分配给数据框时发生变化

feather - 如何压缩和解压缩 Arrow 或 Feather 文件?

python - 如何有效删除仅包含 0 作为值的前导行?