Why?
- See output of Python changes
How
- Create a Jupyter notebook
- Make my changes in the codebase
- Import the changed files in the notebook
- Inspect the output in the notebook
- If I make significant code changes, run
Kernel > Restart and clear output
to refresh the notebook
In VS Code
- “Jupyter variables” panel
- can use
pdb
in notebooks as well - In VS Code, add
#%%
to a.py
file to run lines as a Jupyter cell - Jupyter Notebooks in VS Code Extension NEW in 2022 - Tutorial Introducing Kernels, Markdown, & Cells • Kris Jordan 📺
- How VSCode has leaped forward as Jupyter Notebook Editor • Tino T. Herden 📖
- Working with Jupyter code cells in the Python Interactive window • VS Code Docs 📚
- VSCode’s Python Interactive mode is AMAZING! • Jack of Some 📺
I’ve gone from serial Jupyter Notebook user to someone that almost never uses them and it’s all thanks to VSCode’s interactive mode for Python. Check it out!
- How VSCode has leaped forward as Jupyter Notebook Editor | by Tino T. Herden | Towards Data Science
- Working with Jupyter code cells in the Python Interactive window • VS Code
- Jupyter Notebooks in VS Code Walkthrough • VS Code
- Jupyter Notebooks in VS Code • Very Academy
- Setting up Jupyter Notebook in Visual Studio Code • Douglas Starnes
- VS Code tips — Debugging Jupyter notebooks • Use ‘Debug Cell’ in VS Code to debug Python code cells in notebooks. Step through code, inspect variables, and even use the debug console to evaluate expressions!
- 🔴 Learn Data Science from SCRATCH (with GitHub CoPilot) • VS Code
- 5 things you had no idea you could do with Jupyter Notebooks • Impressive stuff, actually • Visual Studio Code 📺
Keyboard shortcuts
Here are a few examples of the default
Shift + Enter
: Run the current cell and move to the next cell.Ctrl + Enter
: Run the current cell.Alt + Enter
: Run the current cell and insert a new cell below.A
: Insert a new cell above the current cell (when in command mode).B
: Insert a new cell below the current cell (when in command mode).D, D
(press the key twice): Delete the current cell (when in command mode).Y
: Change the cell type to Code (when in command mode).M
: Change the cell type to Markdown (when in command mode).
To enter command mode, press Esc
. To go back to edit mode, press Enter
.
In Jupyter Lab
- Keyboard shortcuts:
<s-tab>
= show hover docs
- jupyterlab-contrib/jupyterlab-vim • Vim notebook cell bindings for JupyterLab.
- How to enable VIM mode for editing notebooks in jupyter-lab? - Stack Overflow
- Jupyter Notebook Complete Beginner Guide - From Jupyter to Jupyterlab, Google Colab and Kaggle! • Rob Mulla 📺
Jupytext
- Jupytext: The hack-free way to use Jupyter notebooks with git | nikvdp • Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts
- Jupytext documentation
- jupytext/docs/faq.md
- jupytext/docs/tutorials.md
In the terminal
- Use Jupyter Notebook in the Terminal / Shell/ Bash with nbterm | Python Data Science Workflow • Demo of
nbterm
(nowjpterm
) • 1littlecoder 📺- Notebook editor - jpterm • jpterm docs 📚
Hex
- A notebook alternative to Jupyter
Inbox
- jupyter: how do use it well inside VS Code? find a course? save some useful notebooks in my python projects?
- copilot: Copilot and Jupyter Notebooks - 1 min video showing how to use copilot to quickly import, clean and reduce the memory usage of CSV data imported as a Pandas dataframe