1. ModuleNotFoundError: No module named 'xlrd'
没有包,那就安装 pip install packagename
2. raise ReadTimeoutError(self._pool, None, 'Read timed out.')
安装超时,那就设置默认超时时间:pip install packagename --default-timeout=1000
3. SyntaxError: Non-ASCII character ‘\xe5’ in file
# -*- coding: utf-8 -*-
3. TypeError: 'regex' must be a string or a compiled regular expression or a list or dict of strings or regular expressions, you passed a 'bool'
4. IndexError: list assignment index out of range
flag=[]
向空列表插入值,不能指定位置插入,如flag[0]=1,而应该使用append,如flag.append(1)
5. 输出图表的汉字不显示:
mpl.rcParams['font.sans-serif'] = ['SimHei']
空值替换
replace(np.nan,0)