Jupyter Notebook

1、下载安装

  官网地址:https://jupyter.org/install

#激活python环境
activate
conda activate python3.8
pip install ipython pyzmq jinja2 tornado notebook jupyterlab voila scikit-learn

2、启动

# 以默认参数启动
jupyter notebook
# 启动时打开test.ipynb
jupyter notebook test.ipynb
# 启动时指定端口
jupyter notebook --port 12345
# 启动时不打开浏览器
jupyter notebook --no-brower
# 允许任意IP连接
jupyter notebook --ip="*"

3、创建文件夹、文件、Notebook等

4、jupyter基本操作

(1)创建Notebook

(2)Code

  Code Cell(用于编写代码),Markdown Cell(用于书写文本)。

(3)常用快捷方式(按Enter键进入编辑模式)

  a. Ctrl + Enter = 运行当前单元代码

  b. Shift + Enter = 运行当前单元代码并指向下一个单元

  c. Alt + Enter = 运行本单元代码并在下方插入新单元

(4)常用快捷方式(按Esc键进入编辑模式)

  a. Up(Down)= 选中上方或下方单元

  b. Shift + K = 扩大选中上方单元

  c. Shift + J = 扩大选中下方单元

  d. Shift + M = 合并选中的单元

  e. A = 在当前单元格上面创建一个新的单元格

  f. B = 在当前单元格下面创建一个新的单元格

  g. 双击D = 删除本单元格

  h. Z = 撤销已删除的单元格

  i. M = 插入markdown格式文本

posted @ 2024-01-14 10:35  宜家数据小哥  阅读(9)  评论(0编辑  收藏  举报