Jupyter notebook 介绍

1.程序是怎么执行的

步骤:1 明确操作 2 写出对应代码 3 翻译代码 4 执行代码 5 调试代码

2.IDE 和IDLE

IDE 一般包含三个主要组件:源代码编辑器、编译器、解释器、调试器

IDLE 是IDE的一种,是python自带的一个IDE

常用的IDE 有 Jupyter、Pycharm、Sublime Text


Python 数据分析 - Jupyter notebook 介绍

运行 Run = Ctrl+Enter

Python 数据分析 - Jupyter notebook 介绍

当[ ] 为空时 表示当前cell 未执行

为[2] 内数字表示该Jupyter_Notebook 运行的2次

为[*]表示当前cell 为正在运行状态


3.重新运行所有cell


Python 数据分析 - Jupyter notebook 介绍

4.重命名notebook 文件名


Python 数据分析 - Jupyter notebook 介绍

方法1


Python 数据分析 - Jupyter notebook 介绍

方法2

5.保存和另存为文件

Python 数据分析 - Jupyter notebook 介绍

6.导入本地Jupyter_notebook 文件

Python 数据分析 - Jupyter notebook 介绍

7.为文件进行分类

Python 数据分析 - Jupyter notebook 介绍

8.为Jupyter_notebook 添加拓展功能

  • 目录
  • 代码自动补全
  • 代码运行时间

方法:

打开 Anaconda Prompt 将 pip install jupyter_contrib_nbextensions 复制进去 回车即可,安装好后,需要将此插件和我们的notebook 进行配置 将Jupyter contrib nbextension install --user 回车后,重启Jupyter notebook 软件后即可看到

Python 数据分析 - Jupyter notebook 介绍

新增Nbextensions 选项,在里面找需要的拓展功能

Python 数据分析 - Jupyter notebook 介绍

9.Markdown 功能

可以制作标题;

Python 数据分析 - Jupyter notebook 介绍

  1. 常用的快捷键功能
Python 数据分析 - Jupyter notebook 介绍

常用的快捷键

  • 运行代码:Ctrl + Enter
  • 合并cell:按住Shift,用鼠标选择cell,然后再按M
  • 批量上注释:Ctrl + /
  • 替换查找:ESC + F
Python 数据分析 - Jupyter notebook 介绍

合并cell:按住Shift,用鼠标选择cell,然后再按M

Python 数据分析 - Jupyter notebook 介绍

批量上注释:Ctrl + /,在按Ctrl+/ 可都取消注释

Python 数据分析 - Jupyter notebook 介绍

替换查找:ESC + F


分享到:


相關文章: