ModuleNotFoundError Traceback most recent call lastCell In6 line 2 1 #用XGBoost来将缺失值进行预测替换---- 2 import xgboost as xgb 3 from sklearnmodel_selection import train_test_sp
出错原因:找不到名为xgboost的模块。
解决方法:需要安装xgboost模块,可以通过在命令行中运行以下命令来安装:
pip install xgboost
如果您使用的是Anaconda,则可以使用以下命令:
conda install -c anaconda py-xgboost
安装完成后,再次运行代码即可。
原文地址: https://www.cveoy.top/t/topic/hslM 著作权归作者所有。请勿转载和采集!