Label encodeing 遇到的错误

错误图示:

Python--TypeError: ‘<‘ not supported between instances of ‘str‘ and ‘float‘

 代码没有错误,主要是数据处理错误。

将字符类型利用label encoding 映射成 数字,但是数据原本有缺失。

题主将其全部替换成了0,但是不能够同时处理字符串和数值的类型。

因此将原本的0,全部又替换成了字符“a”,得到了解决。

相关文章:

  • 2021-10-07
  • 2022-12-23
  • 2021-06-25
  • 2021-09-10
  • 2022-12-23
  • 2021-12-11
  • 2021-11-10
猜你喜欢
  • 2021-05-14
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案