文章目錄
一.基本命令
1.1啓動
1.選擇路徑
F:\file\pyfile\1\Code\Data_Analysis>jupyter notebook
2.指令打開
jupyter notebook
1.2注意
不能掛掉cmd
1.3快捷鍵
要先選中整體,而不是在單元格里面
快捷鍵 | 說明 |
---|---|
A | 在單元格上方插入 |
D,D | 刪除本單元格 |
B | 在單元格下面插入 |
Z | 撤銷 |
F | 查找與替換 |
Y | 把當前單元格變成代碼單元格 |
Shift+上下 | 選中多個單元格 |
Shift+M | 合併多個單元格 |
M | 單元轉入markdown狀態 |
R | 單元轉入raw狀態 |
Tab | 自動補全 |
1.4.導出使用
二.軟件配置
2.1自動補全
1.安裝nbextensions
pip install jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple
jupyter contrib nbextension install --user
2.安裝nbextensions_configurator
pip install --user jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
3.勾選自動補全
2.2配色
1.安裝
pip install jupyterthemes
pip install --upgrade jupyterthemes
2.查看有什麼樣式
jt -l
3.更換
jt -t 主題名
4.自己的配置
jt -t onedork -fs 13 -cellw 90% -ofs 11 -dfs 11 -T
jt -t gruvboxd -fs 15 -cellw 90% -ofs 11 -dfs 11 -T
5.默認主題
jt -r
2.3.輸出多行
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"