

VS Code 生产力指南 - Jupyter Notebook
source link: https://wiki-power.com/VSCode%E7%94%9F%E4%BA%A7%E5%8A%9B%E6%8C%87%E5%8D%97-JupyterNotebook
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

VS Code 生产力指南 - Jupyter Notebook
用 VS Code 打造高效率的生产力工具。
Jupyter Notebook 是一个很强大的工具,它允许我们在一个文档环境内编写、运行代码、查看输出、将数据可视化并查看结果……总之,有了它,我们写含代码的文档就方便多了。
在上一篇文章中,我们完成了 VS Code 基本环境的搭建。这篇文章我将对 Jupyter with VS Code 进行详细讲解。
环境配置#
众所周知,Jupyter Notebooks 依赖 Python 环境。
为了确认你是否拥有 Python 环境,在 VS Code 命令面板(Ctrl + Shift + P
)内键入 Python: Select Interpreter,如果看到有可以选择的 Python 版本,那就没问题。
如果没有 Python 环境,可以通过以下方法安装:
- 在 Python 官网 下载最新版本安装包(尽量选择
web-based installer
版本)
配置完本地 Python 环境后,我们还需要在 VS Code 内安装 Python 插件。在近期的一次更新中,Jupyter Notebooks 已经被包含在这个插件内,不用再单独安装了。
创建笔记本#
环境配置完成后,我们可以在 VS Code 命令面板(Ctrl + Shift + P
)输入 Python: Create Blank New Jupyter 创建一个空白的 Jupyter 笔记本(.ipynb
文件)。如下图简单测试一下:
可以看到,代码正常运行。
基本操作#
Jupyter Notebook 使用 代码单元(code cells) 的形式来创建、编辑和运行代码。
添加 code cells#
运行单个 code cell#
运行多个 code cells#
移动 code cell#
删除 code cell#
在代码与 Markdown 之间切换#
图表查看器#
通过图表查看器,你可以轻松查看代码输出的图表,也可以将图标导出各种格式的图片:
数据与变量查看器#
变量的类型、数量与值可以通过变量查看器实时查看:
也可以通过数据查看器浏览更具体的数据:
参考与致谢#
文章作者:Power Lin
原文地址:https://wiki-power.com
版权声明:文章采用 CC BY-NC-SA 4.0 协议,转载请注明出处。
Recommend
-
171
yunabe/lgo master ...
-
160
Page not found – 不正經的社長 Skip to content
-
93
mapboxgl-jupyter - Use Mapbox GL JS to visualize data in a Python Jupyter notebook
-
131
README.rst EIN -- Emacs IPython Notebook
-
93
GitHub is where people build software. More than 27 million people use GitHub to discover, fork, and contribute to over 80 million projects.
-
84
README.md Ansible Jupyter Kernel
-
82
README.md fast_progress A fast and simple progress bar for Jupyter Notebook and console. Created by Sylvain Gugger for fast.ai. Copyright 2017 o...
-
62
Jupyter Notebook 是一个很棒的教学、探索和编程环境,但其功能不足也是出了名的。幸好,有许多方法可以改进这个不错的工具,如JupyterNotebook 扩展工具。 极简版教程 在命令提示符中运行以下命令: pi...
-
7
Adicionando kernels do C# e F# no Jupyter Notebook/Lab. (#csharp #fsharp #dotnet #jupyter) Posted on
-
5
作者:京东科技隐私计算产品部 孙晓军 1. Jupyter Notebook介绍
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK