随笔分类 -  python

摘要:因为jupyter notebook 通过anaconda或mini anaconda安装,启动jupyter notebook 记得通过conda启动,从windows shell终端无法打开。 阅读全文
posted @ 2023-01-20 17:46 xinkevinzhang 阅读(68) 评论(0) 推荐(0)
摘要:#在写python脚本时遇到AttributeError: 'NoneType' object has no attribute 'append' a=[] b=[1,2,3,4] a = a.append(b) 执行一次后发现a的类型变为了NoneType。 下次执行时就会出现如题所示的错误。 把 阅读全文
posted @ 2023-01-09 07:01 xinkevinzhang 阅读(707) 评论(0) 推荐(0)
摘要:Jupyter notebook如何打印多个结果 from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity='all' InteractiveShell.ast 阅读全文
posted @ 2023-01-07 07:31 xinkevinzhang 阅读(192) 评论(0) 推荐(0)
摘要:作用:是控制绘图不显示 在导入matplotlib库后,且在matplotlib.pyplot库被导入前加“matplotlib.use(‘agg’)”语句。 注意matplotlib.use('agg')必须在本句执行import matplotlib.pyplot as plt前运行 阅读全文
posted @ 2022-12-21 09:07 xinkevinzhang 阅读(290) 评论(0) 推荐(0)