我正在开发一个项目,其中有一个 .rds 文件,其中包含根据我的要求由 R 代码生成的经过训练的模型。
现在我需要在 python 中加载经过训练的模型并使用它来处理记录。
有什么办法可以做到吗?如果不是,还有什么替代方案。
谢谢
最佳答案
我们可以使用 Feather :
import feather
path = 'my_data.feather'
feather.write_dataframe(df, path)
df = feather.read_dataframe(path)
关于python - 从 Python 访问 .rds 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39093931/