Easily open up .ipynb files by double-clicking on them

If you are a Data Scientist (or working to become one), you would be familiar with Jupyter Notebook. Jupyter Notebook provides a convenient way to combine your Python code (or other languages) together with your Markdown text into a single canvas known as a notebook. The advantage of Jupyter Notebook is that it allows you to selectively run and modify parts of your code easily, without needing to run the program in its entirety. In addition, you can embed formatted text (and figures) into your file, thereby making it easy for others to read and modify your code directly.

However, using Jupyter Notebook requires you to start the built-in Jupyter Notebook server. And you often have to navigate to the directory containing your .ipynb files before starting the server, or else you will have a hard time locating them.

Until now. You can now run Jupyter Notebook in Visual Studio Code (VS Code). In this short article, I will show you how to install Jupyter Notebook support in VS Code so that you can open up a .ipynb file by directly double-clicking on it and editing it in VS Code.

In this article, I am going to assume you already have Python installed on your computer, together with the Jupyter packages. The easiest way to achieve this requirement is to install Anaconda — https://www.anaconda.com/products/individual-d.

Why do you need to use Jupyter Notebook in VS Code when you already have Anaconda installed? Well, doing so allows you to quickly open up a .ipynb file without needing to start the Jupyter Notebook server.

First, launch your VS Code and type “jupyter notebook” in the extension search box. Select the first result (Jupyter) and click on the Install button displayed in the middle of the screen:

That’s it! Once the installation is done, you already have Jupyter Notebook on your VS Code.

To create a new Jupyter Notebook file, press Ctrl-Shift-P (Shift-Cmd-P for macOS) to invoke the Command Palette. Type “Jup” and you will see a list of options. Select “Jupyter Notebook: Create New Blank Notebook”:

A new blank Jupyter Notebook will be created:

Before you can run your Notebook, you need to select a kernel by clicking on the button at the top-right corner of the Window. For my machine I will select the Python version that is installed by Anaconda:

A notebook kernel is a code engine that executes the code contained in a Notebook document. It is what enables you…

Continue reading: https://towardsdatascience.com/installing-jupyter-notebook-support-in-visual-studio-code-91887d644c5d?source=rss—-7f60cf5620c9—4

Source: towardsdatascience.com