Jupyter Notebooks in VS Code
VS Code provides a rich Jupyter notebook experience — run cells, view rich outputs, and use Copilot for code generation, all without leaving the editor.
1Opening a Notebook
Open any .ipynb file and VS Code renders it as an interactive notebook. New notebook: Ctrl+Shift+P → Create: New Jupyter Notebook. Select a Python kernel from the kernel picker in the top-right.
2Running Cells
Shift+Enter Run cell and move to next Ctrl+Enter Run cell in place Alt+Enter Run cell and insert below A Insert cell above B Insert cell below D D Delete cell
3Rich Output & Variables
Cells can render DataFrames as tables, Matplotlib/Plotly charts inline, images, HTML, and LaTeX. Open the Variables panel (the table icon in the toolbar) to inspect all variables in memory without printing them.
4Using Copilot in Notebooks
Copilot works in every notebook cell. Use /generate in Inline Chat to create entire analysis pipelines from a description, or ask Copilot to explain the output of a cell.
import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv('data.csv') df.head()
5Exporting Notebooks
Right-click the notebook → Export to save as .py, .html, or .pdf. The nbconvert integration handles the conversion automatically. You can also sync notebook output to GitHub with the built-in Clear Outputs before committing.