python_data_analysis_and_mining_action
python_data_analysis_and_mining_action copied to clipboard
书籍PDF出现了错误
在书籍PDF32页的位置,在介绍reduce函数的时候,讲到需要通过from fuctools imoprt redduce
导入reduce
但是根本不存在fuctools
正确的导入的方式是from functools import reduce
并且这个库已经内置不需要另行安装
在书籍PDF48页的位置,在介绍箱形图的时候
按照书籍导入的import matplotlib as plt
在实际使用的时候 会出现 module 'matplotlib' has no attribute 'figure' 的错误
正确的导入方式应该是import matplotlib.pyplot as plt
按照书籍程序p = data.boxplot()
在实际使用的过程当中 会出现 TypeError: 'AxesSubplot' object is not subscriptable
正确的程序应该是 p = data.boxplot(return_type='dict')
产生的原因可能是没有指定p的类型,导致下面不能获取指定的下标