python xgboost 出现 FutureWarning: pandas.Int64Index is deprecated

问题:

python使用xgboost 出现

FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead.

from pandas import MultiIndex, Int64Index

解决:

版本问题,在1.6.0版本的xgboost中已被修复,更新xgboost即可:

pip install --upgrade xgboost

参考:

https://github.com/dmlc/xgboost/issues/8123
Warning: Pandas deprecation, please fix this · Issue #7894 · dmlc/xgboost · GitHub
 


版权声明:本文为weixin_51723388原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。