AttributeError: 'dict' object has no attribute 'iteritems'
#python3.6在学习《机器学习实战》的时候,如下代码会报错:sortedClassCount = sorted(classCount.iteritems(),key=operator.itemgetter(1),reverse=True)错误:AttributeError: 'dict' object has no attribute 'iteritems'原因是python3以后用item...
原创
2018-06-10 10:23:36 ·
763 阅读 ·
0 评论