Jupyter Notebook的使用

1.使用命令jupyter notebook启动,启动之后我们在浏览器端看到Jupyter server的页面,这里显示当前目录的tree

2.创建一个notebook, 点击 New按钮, 选择Notebook的kernel(如Python 3).


3.这里主要包括了两个notebook cell:Markdown cell和code cell

选择code cell,输入:

import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
print("hello world!")
plt.imshow(np.random.rand(20,20),interpolation='none');
from IPython.display import display_html
from IPython.html.widgets import FloatSlider
display_html('<table><tr><td>some</td><td>table</td></tr></table>',raw=True)
FloatSlider(value=70)


4.Markdown cell和code cell这两种模式下的快捷键

• Ctrl + Enter: run the cell
• Shift + Enter: run the cell and select the cell below
• Alt + Enter: run the cell and insert a new cell below
• Ctrl + S: save the notebook

5.编辑模式下的快捷键

• Esc: switch to command mode
• Ctrl + Shift + -: split the cell

6.命令行模式下的快捷键

• Enter: switch to edit mode
• ↑ or k: select the previous cell
• ↓ or j: select the next cell
• y / m: change the cell type to code cell/Markdown cell
• a / b: insert a new cell above/below the current cell
• x / c / v: cut/copy/paste the current cell
• dd: delete the current cell
• z: undo the last delete operation
• Shift + =: merge the cell below
• h: display the help menu with the list of keyboard shortcuts

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值