g
y
7
7
7
7

sweetviz工具避坑和简单使用

网上关于sweetviz的文章比较少,有些坑这里说一下给大家避坑。

使用sweetviz遇到的错误如下:

  1. KeyError: "None of ['index'] are in the columns"
  2. AttributeError: 'DataFrame' object has no attribute 'iteritems' ( iteritems在pandas 2.0+中改为items() )
  3. AttributeError: module 'numpy' has no attribute 'warnings'

解决方法:
都是版本导致的问题,用老版本可以解决,下面是我用的版本。博主没有深究根本原因,感兴趣的可以网络搜索搜索。

pip install pandas==1.5.3    
pip install numpy==1.23.4   

改完报错就可以愉快的使用sweetviz了,用sweetviz做EDA还是挺香的。

posted @ 2023-08-15 21:04  gy77  阅读(62)  评论(0编辑  收藏  举报