python - 预测 NaN、无穷大或对于 dtype('float64') 来说太大的值
问题描述
我正在使用 auto_arima 使用以下代码预测一些值:
prediction_tot=pd.DataFrame(arima_model_tot.predict(n_periods=104),index=test_tot.index)
prediction_tot.columns=['total']
prediction_tot
但我收到了这个错误:输入包含 NaN、无穷大或对于 dtype('float64') 来说太大的值。
我尝试使用fillna,但它不起作用,我想我预测的是无穷大或大值而不是NaN。也尝试使用 np.finfo 但徒劳无功,可能是我不知道如何将它集成到我的代码中。感谢你们对我的帮助
解决方案
推荐阅读
- python - Tkinter 无法识别图像文件中的数据
- node.js - 等待sqlite返回结果的节点
- html - Node.js Puppeteer 和 Cheerio Div 表抓取
- javascript - 每次遇到一个元素时,将一个数组拆分为多个数组的最佳方法是什么?
- r - 使用 sqldf 按分隔符解析
- python - Pytorch batch matrix vector outer product
- java - Java编程:用“_”替换每个单词的第一个和最后一个字母
- php - PHP - 如何修改对象数组中的 category_name 和 subcategory_name?
- c - C 为什么我的代码中创建的线程数不一致?
- sql - 在 Aginity Workbench SQL 中选择 1% 的样本