美文网首页
jupyter notebook扩展插件

jupyter notebook扩展插件

作者: 长歌行夜一 | 来源:发表于2019-11-01 07:55 被阅读0次

用conda安装:

conda install -c conda-forge jupyter_contrib_nbextensions

conda install -c conda-forge jupyter_nbextensions_configurator

或者用pip:

pip install jupyter_nbextensions_configurator jupyter_contrib_nbextensions

jupyter contrib nbextension install --user

jupyter nbextensions_configurator enable --user

1.魔法函数

1)

%prun  执行函数

告诉你函数的耗时情况

2)

%matplotlib inline 作图时,最后一句函数不输出显示,只需在语句后加分号:plt.hist(data);

3)写shell命令

!ls 目录

4)调试工具: %pdb

5)

%%writefile xxx.py  # 到处cell内容到一个文件

%pycat xxx.py   # 语法高亮展示一个文件(外部脚本)

6)%%time

告诉你一个cell里的运行时间

%%timeit 加语句

告诉你一个语句的平均运行时间 (默认语句运行100000次,提供最快的三次的平均值)

相关文章

网友评论

      本文标题:jupyter notebook扩展插件

      本文链接:https://www.haomeiwen.com/subject/dznxbctx.html