Jupyter CookBook by Eric

1. 安装:[Jupyterlab Installation]

添加其它kernel(conda环境)

可以参考我的博文《Jupyter Lab——如何添加没有出现的kernel》

2. 快捷键​

KeyDescription
esc命令模式
enter编辑模式

学习教程

  1. 《Jupyter常用快捷键与常用功能 - mac篇》- Willstar

3. 调试输出

Jupyter可以直接ims[0]显示numpy.ndarray图像

示例如下:
在这里插入图片描述

2 执行终端命令——“!”命令

在Jupyter-Lab中执行终端命令可以使用!命令,因为Jupyter-Lab中无法单独开启终端;

3 统计代码运行时间

%%timeit:单元模式测试运行时间

%%time:在单元模式(cell模式)下,代码运行一次所花费的时间。
%%timeit:在单元模式下,执行代码块若干次,取最佳结果。
关于相关命令的解释,我觉得Jieru_liu的解释很棒,请参见《%time、%timeit、%%time、%%timeit的区别(ipython中查看代码执行时间的魔法命令)》
关于%%timeit的API说明,请参见《Built-in magic commands — IPython documentation | timeit》

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
We are becoming awash in the flood of digital data from scientific research, engineering, economics, politics, journalism, business, and many other domains. As a result, analyzing, visualizing, and harnessing data is the occupation of an increasingly large and diverse set of people. Quantitative skills such as programming, numerical computing, mathematics, statistics, and data mining, which form the core of data science, are more and more appreciated in a seemingly endless plethora of fields. Python, a widely-known programming language, is also one of the leading open platforms for data science. IPython is a mature Python project that provides scientist-friendly interactive access to Python. It is part of the broader Project Jupyter, which aims to provide high-quality environments for interactive computing, data analysis, visualization, and the authoring of interactive scientific documents. Jupyter is estimated to have several million users today. The prequel of this book, Learning IPython for Interactive Computing and Data Visualization Second Edition, Packt Publishing was published in 2015, two years after the first edition. It is a beginner-level introduction to data science and numerical computing with Python, IPython, and Jupyter. This book, the first edition of which was published in 2014, continues that journey by presenting more than 100 recipes for interactive scientific computing and data science. These recipes not only cover programming topics such as numerical computing, high-performance computing, parallel computing, and interactive visualization, but also data analysis topics such as statistics, data mining, machine learning, signal processing, graph theory, numerical optimization, and many others. This second edition is fully compatible with the latest versions of the platform and its libraries. It includes new recipes to better leverage the latest features of Python 3, and it introduces promising new projects such as JupyterLab, Altair, and Dask.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值