当前位置:   article > 正文

暴力!解决“FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future”

futurewarning: setting an item of incompatible dtype is deprecated and will

python报错:FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas.........has dtype incompatible with float32, please explicitly cast to a compatible dtype first.

不影响程序运行,只是不断弹出影响输出查看。

认为是无关紧要的小问题,不关乎结果正确与否,

采取暴力消除的方式

  1. import warnings
  2. warnings.simplefilter(action='ignore', category=FutureWarning)
'
运行

完美解决!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/神奇cpp/article/detail/958613
推荐阅读
  

闽ICP备14008679号