
上QQ阅读APP看本书,新人免费读10天
设备和账号都新为新人
1.2.2 Python编辑器介绍
一个Notebook的编辑界面主要由4部分组成:名称、菜单栏、工具条以及单元格(Cell),如图1.13所示。

图1.13 Notebook编辑界面
1.菜单栏
(1)File
菜单栏中File的功能见表1.2。
表1.2 菜单栏中File的功能

(2)Edit
菜单栏中Edit的功能见表1.3。
表1.3 菜单栏中Edit的功能

(3)View
菜单栏中View的功能见表1.4。
表1.4 菜单栏中View的功能

(4)Insert
菜单栏中Insert的功能见表1.5。
表1.5 菜单栏中Insert的功能

(5)Cell
菜单栏中Cell的功能见表1.6。
表1.6 菜单栏中Cell的功能

(6)Kernel
菜单栏中Kernel的功能见表1.7。
表1.7 菜单栏中Kernel的功能

(7)Help
菜单栏中Help的功能见表1.8。
表1.8 菜单栏中Help的功能

2.工具条
工具条功能如图1.14所示。

图1.14 工具条功能
3.单元格的4种功能
图1.15所示的单元格有4个选项:代码、Markdown、原生NBConvert以及标题,这4种功能可以互相切换。“代码”用于写代码;“Markdown”用于文本编辑;“原生NBConvert”中的文字或代码等都不会被运行;“标题”用于设置标题,这个功能已经包含在Markdown中。

图1.15 单元格的4个选项
Markdown用于编辑文本,表1.9给出常用的Markdown用法。
表1.9 常用的Markdown用法
