Code Skiller logoCB Logo
Logo LearnLearnLogo PracticePracticeLogo HireHireLogo IDEIDE

What is Jupyter Notebook?

User image

Published by

sanya sanya

Published at: 21st May, 2023
5.195 mins read

Jupyter Notebook

Jupyter Notebook is an open-source tool which allows the users to create and share documents with real-time code, equations, visuals, and text. Jupyter Notebook was earlier termed as IPython which was changed to Jupyter in 2014.

A notebook is a mutable file which is stored in .ipynb format. A server-client programme called the Jupyter Notebook enables editing and executing notebook papers using a web browser. The Jupyter Notebook can be deployed on a remote server and accessible through the internet, or it can be run locally on a desktop without the need for an internet connection (as detailed in this paper).

Installation and Setup

Jupyter Notebook can be installed using pip. Once installed, it can be launched by typing the command "jupyter notebook" in the terminal. This will open the jupyter notebook interface in the web browser.

Starting the Notebook Kernel

To start the Jupyter Notebook server open your terminal or command prompt and write the following command:

Jupyter notebook

Alt text

By default, the web application's URL is http://127.0.0.1:8888, and this will output some information about the notebook server in your console and launch a web browser with that address.

The dashboard, which serves as the home page for the Jupyter notebook web application, displays all of the open notebooks in the directory where the server was launched from by default.

With the New Notebook button on the dashboard, you may create brand-new notebooks or access ones that already exist by clicking on their names. Standard.py Python source code files and.ipynb notebooks may easily be dropped into the notebook list section.

Jupyter Notebook dashboard

Kernel

A notebook kernel is the "computational engine" that executes the code in a Notebook page. Python code is executed by the IPython kernel. There are official kernels available for a broad range of languages.

When you open a Notebook document, kernel starts up right away.When the notebook is executed (either one by one cell or via Run All menu option), the kernel performs the calculation and produces the results. Depending on the sort of computations, the kernel may consume a significant amount of CPU and RAM.

Notebook Dashboard

When you open the Jupyter Notebook App, the component that is displayed immediately is the Notebook Dashboard. The Jupyter Notebook contains a "Dashboard" (Notebook Dashboard), a "control panel" exposing local files and letting them open notebook papers or shutting down their kernels, in addition to displaying, editing, and executing notebook documents. A file manager's additional functionality, such as folder navigation and file renaming/ delete, are also available in the Notebook Dashboard.

Creating New Notebook

At any moment, a new notebook may be started either from the dashboard or by selecting File New from within an existing notebook. The new notebook will open in a new browser tab and is generated in the same directory. Additionally, it will appear as a fresh item on the dashboard's notebook list.

Notebook User Interface

Notebook User Interface

Some features of Jupyter Notebook

Jupyter Notebook provides a wide range of features and options that make it a popular tool among data scientists, researchers, and educators. Here are some of the main features and options provided by Jupyter Notebook:

Code Cells:

Code cells are the main component of Jupyter Notebook, where users can write and execute code. The notebook supports multiple programming languages including Python, R, Julia, and more.

Markdown Cells:

Markdown cells allow users to write formatted text using Markdown syntax. This is useful for adding documentation and explanations to code cells. They may be formatted in simple ways like bold, italic, and headers. Simply click on a markdown cell to render it.

The Markdown code is transformed into the proper formatted rich text when a Markdown cell is performed. Markdown permits any HTML code to be used for formatting. Using the common LaTeX notation $...$ for inline mathematics, you may easily embed mathematics within Markdown cells.

Rich Output:

Jupyter Notebook provides rich output capabilities, including support for HTML, LaTeX, images, videos, and more. This makes it easy to create interactive and engaging documents.

Code Completion:

Jupyter Notebook provides code completion features that help users write code faster and with fewer errors. It also provides syntax highlighting, auto-indentation, and other helpful features.

Keyboard Shortcuts:

Jupyter Notebook have wide range of keyboard shortcuts which enables the users to perform tasks quickly. Users can also create custom keyboard shortcuts to suit their needs. Numerous keyboard shortcuts for Jupyter Notebook are available to help you work more quickly. Some of the commonly used shortcuts are:

  • "Shift + Enter" to run a cell
  • "Esc" to enter command mode
  • "Enter" to enter edit mode
  • "A" to insert a cell above
  • "B" to insert a cell below
  • "D + D" to delete a cell
  • "M" to change a cell to markdown
  • "Y" to change a cell to code

These are just a few of the numerous keyboard shortcuts that Jupyter Notebook offers. Go to the "Help" menu and choose "Keyboard Shortcuts" to view the whole list of shortcuts.

Collaboration:

Jupyter Notebook supports collaboration features that allow multiple users to work on the same notebook simultaneously. Users can also share their notebooks with others via email or other sharing platforms, including:

  • Exporting the notebook as an HTML, PDF, or Markdown file
  • Uploading the notebook to GitHub or another version control system
  • Using Jupyter Notebook Viewer to share notebooks online

Kernel Management:

Jupyter Notebook allows users to manage kernels, which are responsible for executing code. Users can select and switch between kernels, restart kernels, and manage kernel resources.

Customization:

Jupyter Notebook provides customization options that allow users to customize the appearance and behavior of the notebook. This includes themes, fonts, and other settings.

After using the notebook you can close a notebook, click on the "File" menu and select "Close and Halt". This will shut down the kernel and close the notebook. To stop the notebook server, you can either press Ctrl+C in the terminal where the server is running, or you can close the terminal window.

Library

WEB DEVELOPMENT

FAANG QUESTIONS

On this page

: