我们可以使用ExecuteTime插件来计算Jupyter Notebook中每个代码单元的执行时间。使用以下命令安装插件:
-
第一步:
在搜索栏输入cmd,找到Anaconda Prompt;选择以管理员方式运行 -
第二步:
在命令行窗口输入以下三行命令即可
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter nbextension enable execute_time/ExecuteTime
最后打开jupyternotebook看效果-------OK