Jupyter Notebook Extension in Visual Studio Code
Last Updated :
24 Jun, 2021
In this article, we will see how to use Jupyter Notebook in Visual Studio code.
Jupyter Notebook has grown into a popular IDE choice. With the availability of additional kernels in addition to IPython, Jupyter Notebooks can also support Java, R, Julia and other popular programming languages besides Python. The notebook integrates the outlines of Markdown text and executable source code to empower collaborative, scalable, and repeatable team projects.
VS Code is another open-source IDE that has gained popularity among developers using various programming languages, such as JavaScript, C# and Python, and the list of supported languages. Continues to grow as more code related VS plugins are being developed. However, there is no native support for creating and editing Jupyter Notebooks.
Everything has changed! With the recent release of the VS Code Python plugin in 2019, VS Code has provided native Jupyter Notebook support, allowing me to work on my notebooks without running Jupyter Notebooks. . In this article, we will discuss the basics of how to use Jupyter notebooks in VS Code.

Creating Jupyter Project notebooks:
To create a new Notebook, simply go to View -> Command Palette (⇧⌘P on Mac). After the palette appears, search for “Jupyter” and select the option “Python: Create Blank New Jupyter Notebook”, which will create a new notebook for you. For the purpose of this tutorial, I created a notebook called JupyterExample.ipynb as shown below.
Insert and delete cells:
To insert a cell, click the plus sign on the toolbar or the plus sign to the left of the cell. To delete a cell, click the delete symbol (that is, the trash can symbol) on the right side of the cell.
Switching Cell Content-Type and State:
To change the content type, click the code/markdown area in the cell. To change state, click the text entry box to put it in edit mode. Click the vertical bar to the left of the cell to switch to command mode. When you click on another cell, the previously selected cell will be deselected. The status of the cell is indicated by the vertical bar to the left of the cell.
Shortcuts in Command State:
When the cell is in the command state, as shown by the solid blue line on the left, the following shortcuts can be used.
Shortcut |
Function |
a |
Insert a cell above the current cell |
b |
Insert a cell below the current cell |
dd |
Delete the cell |
l |
Show the line numbers |
y |
Set the content type as code |
m |
Set the content type as Markdown |
Run Code Cells:
To run the code unit, just click the triangle symbol in the code/markdown area. To run all code cells in Notebook, just click the double arrow in the top toolbar.
Although not shown in the figure above, the triangle with the up arrow in the toolbar is used to execute the code unit above the currently located cell, and the triangle with the down arrow is used to execute the code unit below the currently contained cell.
Getting the Variables Viewer:
To see the list of declared variables, simply click on the variable in the toolbar and a table will appear showing all the defined variables. If you declare a new one, it will be automatically included in the table.
Getting the Plot Viewer:
For the generated plots, we can click the chart icon in the corner of the chart output, as shown in the figure below.
In the plot viewer, you will see a toolbar at the top, which has some common functions, such as zooming in and out and saving graphs.
Saving the jupyter notebook :
You can use the Ctrl + S keyboard combination or use the save icon on the Notebook Editor toolbar to save Jupyter Notebook.

Exporting the Jupyter Notebook:
You can export Jupyter Notebook as Python (.py), PDF or HTML files. To export, just click the conversion icon on the main toolbar. Next, you will see the command panel file options.

Similar Reads
Using Jupyter Notebook in Virtual Environment
In this article, we are going to see how to set Virtual Environment in Jupyter. Sometimes we want to use the Jupyter notebook in a virtual environment so that only selected packages are available in the scope of the notebook. To do this we have to add a new kernel for the virtual environment in the
2 min read
10 Interesting Jupyter Notebook Shortcuts and Extensions
Jupyter Notebook is equipped with numerous extensions and shortcuts which assist a lot of programmers, developers in their everyday operations. Such operations could be like doing data analysis of every single document comprising of computational explanatory text or adding easy links for common libr
9 min read
How to setup Conda environment with Jupyter Notebook ?
Anaconda is open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder
2 min read
How to Hide all Codes in Jupyter Notebook
Jupyter Notebooks have become indispensable tools for data scientists, researchers, and educators alike. They provide an interactive and dynamic environment for writing code, documenting processes, and presenting results. However, when it comes to sharing your work, particularly in lectures or prese
4 min read
How to Write and Run Code in Jupyter Notebook
Jupyter Notebook is an open-source web application. It allows to generate and share documents that contain live code, equations, visualized data, and many more features. Nowadays it has become the first choice of many of the data scientists due to it's immense data visualization and analysis capabil
7 min read
How To Delete Cell In Jupiter Notebook
Jupyter Notebook is a powerful tool for developers. Jupyter is an open-source web application that contains both code and text elements such as figures, questions, pictures, etc. Jupiter's main meaning is Julia, Python, and Ruby. Jupyter Notebook is a web-based computational environment for creating
3 min read
How to upload a dataset in Jupyter Notebook?
Jupyter Notebook is a web-based powerful IDE tool that helps with data analysis, visualization and narrative multi-media. Uploading a dataset is a very common task when working in the Jupyter Notebook. It is widely used by data analysts, data scientists, researchers and other developers to perform d
4 min read
How to Delete Markdown in Jupyter Notebook
In this article, we will cover How to delete markdown in Jupyter Notebook we will discuss various methods to do the same. First, we look at what is Jupyter Notebook and markdown and why we use them, we discuss different methods to delete a markdown in Jupyter Notebook in this article. Jupyter Notebo
4 min read
How to Add a Table of Contents in the Jupyter Notebook
In this article, we will cover How to add a table of contents to the Jupyter Notebook. First, we look at what Jupyter Notebook and table of contents and why we use them, followed by a step-by-step tutorial to add a table of contents to the Jupyter Notebook. Jupyter NotebookThe Jupyter Notebook is th
4 min read
Jupyter notebook VS Python IDLE
This article will help you if you are confused about which platform to begin coding Python on as Python gives you a variety of options. We have compared two of the options. Jupyter Notebook Jupyter Notebook is basically a web application. Unlike IDEs (Integrated Development Environment), it uses the
4 min read