{"id":45169,"date":"2023-12-19T12:05:19","date_gmt":"2023-12-19T06:35:19","guid":{"rendered":"https:\/\/www.techjockey.com\/blog\/?p=45169"},"modified":"2024-10-04T18:09:46","modified_gmt":"2024-10-04T12:39:46","slug":"how-to-use-jupyter-notebook","status":"publish","type":"post","link":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook","title":{"rendered":"How to Use Jupyter Notebook: A Comprehensive Guide"},"content":{"rendered":"\n<style>\n.lh-callout, .lh-featured-snippet {\n    border: 1px solid #e9e9ea;\n    border-left: 8px solid #ff492c;\n    border-radius: 20px;\n    margin-bottom: 20px;\n    padding: 35px;\n    position: relative;\n}\n<\/style>\n<div class=\"lh-callout lh-featured-snippet\" class=\"has-background\" style=\"background-color:#FAC7B917\">\n  <p><strong>Summary:<\/strong> With Jupyter Notebook, you can write codes, edit notebook cells, or even restart the entire program in a single notebook. Let&#8217;s learn how you can perform these functions in detail in the tutorial below. <\/p>\n<\/div>\n\n\n\n<p>Jupyter Notebook allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Whether you&#8217;re a programmer, data scientist, or researcher, this versatile platform supports multiple programming languages like Python, R, and Julia for data cleaning and analysis.<\/p>\n\n\n\n<p>In this guide, we will learn more about Jupyter Notebook, right from installing to executing code cells, creating visualizations, etc.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-jupyter-notebook\"><span class=\"ez-toc-section\" id=\"what_is_jupyter_notebook\"><\/span>What is Jupyter Notebook?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><a href=\"https:\/\/jupyter.org\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Jupyter Notebook<\/a> is a type of web application used for generating and sharing computational documents for data analysis. It can be used for data cleaning, numerical simulation, data visualization, statistical modeling, etc.<\/p>\n\n\n\n<p>Instead of writing and rewriting the entire document, you can write code in individual cells and run the document code individually. In case you want to make changes to the document, you can go back to it, make changes, and rerun the document, all from the same window.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-install-jupyter-notebook\"><span class=\"ez-toc-section\" id=\"how_to_install_jupyter_notebook\"><\/span>How to Install Jupyter Notebook?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The easier way to use Jupyter Notebook is by installing Anaconda that comes preloaded with Python libraries and tools including NumPy, pandas, Matplotlib, etc. To get started with Anaconda, you need to download the latest version.<\/p>\n\n\n\n<p>If you have python installed already and want to manage all the packages manually, you can use pip: pip3 install jupyter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-use-a-notebook-in-jupyter\"><span class=\"ez-toc-section\" id=\"how_to_use_a_notebook_in_jupyter\"><\/span>How to Use a Notebook in Jupyter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this section, we will be learning about how to run, save, and share your notebooks. Moreover, you will also learn about how to use its components like cells and kernel, along with how to read and write files in Jupyter. Let&#8217;s get started with the guide on how to use a Notebook in Jupyter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-how-to-run-jupyter-notebook\"><span class=\"ez-toc-section\" id=\"1_how_to_run_jupyter_notebook\"><\/span>1. How to Run Jupyter Notebook?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>For launching a Jupyter Notebook, you need to open the terminal and navigate to the directory where you will save the notebook. Next, type command jupyter notebook and the program will instantiate a local server at localhost:8888 (or another specified port).<\/p>\n\n\n\n<p>The browser window will pop up with the Notebook interface or you can use the address it provides to you. These notebooks have a unique token because Jupyter uses pre-built Docker containers for putting notebooks on their unique path. For stopping the kernel from the terminal, press control-C twice.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-creating-a-notebook\"><span class=\"ez-toc-section\" id=\"2_creating_a_notebook\"><\/span>2. Creating a Notebook<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To create a new notebook, go to New and Select Notebook in Python 3. In case you already have Jupyter Notebook, you can click on Upload and go to that file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"513\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194553\/How-to-Use-Jupyter-Notebook.jpg\" alt=\"How to Use Jupyter Notebook\" class=\"wp-image-45176\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194553\/How-to-Use-Jupyter-Notebook.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194553\/How-to-Use-Jupyter-Notebook-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194553\/How-to-Use-Jupyter-Notebook-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194553\/How-to-Use-Jupyter-Notebook-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-using-cells-in-jupyter\"><span class=\"ez-toc-section\" id=\"3_using_cells_in_jupyter\"><\/span>3. Using Cells in Jupyter<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In Jupyter, there are three types of Cells including Code, Markup, and Raw NBConverter.<\/p>\n\n\n\n<ul>\n<li><strong>Code Cell:<\/strong> It contains codes that will be executed in the Kernel. When the code runs, the notebook will display the output of the code cell.<\/li>\n<\/ul>\n\n\n\n<p>For example, in the below image, Fibonacci series is generated with a simple code along with inputs provided by users.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"513\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194641\/Using-Cells-in-Jupyter.jpg\" alt=\"Using Cells in Jupyter: Code Cell\" class=\"wp-image-45185\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194641\/Using-Cells-in-Jupyter.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194641\/Using-Cells-in-Jupyter-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194641\/Using-Cells-in-Jupyter-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194641\/Using-Cells-in-Jupyter-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<p>The output of this command is shown below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"513\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194636\/The-output-of-this-command-is-shown-below.jpg\" alt=\"The output of Using Cells in Jupyter: Code Cell\" class=\"wp-image-45184\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194636\/The-output-of-this-command-is-shown-below.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194636\/The-output-of-this-command-is-shown-below-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194636\/The-output-of-this-command-is-shown-below-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194636\/The-output-of-this-command-is-shown-below-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><strong>Markup Cell:<\/strong> This cell contains the text formatted via Markdown and shows the output in-place while Markdown cell is running. For example, for adding headers, you need to prefix any line by single or multiple \u2018#\u2019 followed by space as shown in the image:<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"191\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194603\/Markup-Cell.jpg\" alt=\"Markup Cell\" class=\"wp-image-45178\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194603\/Markup-Cell.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194603\/Markup-Cell-300x66.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194603\/Markup-Cell-768x169.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194603\/Markup-Cell-260x57.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"271\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194621\/Output.jpg\" alt=\"Output of Markup Cell\" class=\"wp-image-45181\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194621\/Output.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194621\/Output-300x94.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194621\/Output-768x240.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194621\/Output-260x81.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><strong>Raw NBConverter:<\/strong> With this, you can write the output directly and the cells are not evaluated by notebook. Once they are passed via NBConverter, they are added to the destination folder without any changes.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-using-kernal-in-jupyter\"><span class=\"ez-toc-section\" id=\"4_using_kernal_in_jupyter\"><\/span>4. Using Kernal in Jupyter<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The Kernel is a type of computational engine that executes the code present in the notebook document. The kernel exists for a document as a whole rather than for individual cells. For instance, if a mode is added in a single cell, then this module will be available for the entire document.<\/p>\n\n\n\n<p>You will get multiple options to use the kernels like restarting the kernel, changing and clearing the output, and interrupting the kernel.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-how-to-write-a-jupyter-notebook\"><span class=\"ez-toc-section\" id=\"5_how_to_write_a_jupyter_notebook\"><\/span>5. How to Write a Jupyter Notebook<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To read and write files in Jupyter Notebook, click \u2018Browse and upload files\u201d of the left-hand menu to open the file system. Next press \u2018plus\u2019 to upload file from the local folder. For example, when you will upload a simple text file called hello_world.txt., in Jupyter, it will look like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194558\/How-to-Write-a-Jupyter-Notebook.jpg\" alt=\"How to Write a Jupyter Notebook\" class=\"wp-image-45177\" style=\"width:500px\" width=\"500\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194558\/How-to-Write-a-Jupyter-Notebook.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194558\/How-to-Write-a-Jupyter-Notebook-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194558\/How-to-Write-a-Jupyter-Notebook-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194558\/How-to-Write-a-Jupyter-Notebook-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<p>You can use this code to open this file, add some text, and save a new file.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"513\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194649\/You-can-use-this-code-to-open-this-file-add-some-text-and-save-a-new-file.jpg\" alt=\"Code to Open a File in Jupyter Notebook\" class=\"wp-image-45186\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194649\/You-can-use-this-code-to-open-this-file-add-some-text-and-save-a-new-file.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194649\/You-can-use-this-code-to-open-this-file-add-some-text-and-save-a-new-file-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194649\/You-can-use-this-code-to-open-this-file-add-some-text-and-save-a-new-file-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194649\/You-can-use-this-code-to-open-this-file-add-some-text-and-save-a-new-file-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<p>After that, your file will look like this with all the updates.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194548\/After-that-your-file-will-look-like-this-with-all-the-updates.jpg\" alt=\"Files after updating Jupyter Notebook\" class=\"wp-image-45175\" style=\"width:500px\" width=\"500\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194548\/After-that-your-file-will-look-like-this-with-all-the-updates.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194548\/After-that-your-file-will-look-like-this-with-all-the-updates-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194548\/After-that-your-file-will-look-like-this-with-all-the-updates-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194548\/After-that-your-file-will-look-like-this-with-all-the-updates-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-how-to-use-command-mode-and-edit-mode-in-jupyter\"><span class=\"ez-toc-section\" id=\"6_how_to_use_command_mode_and_edit_mode_in_jupyter\"><\/span>6. How to Use Command Mode and Edit Mode in Jupyter<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Jupyter Notebook offers two interaction modes: command mode and edit mode. Within the command mode, you can navigate within cells, add or remove cells, or even change the cell type. With the edit mode, you will be able to modify the cell content.<\/p>\n\n\n\n<p>To enter the command mode, press Escape or click outside the cell. To enter edit mode, press Enter or click inside a cell. In Workspace, click on the \u2018Add Text\u2019 or \u2018Add Code\u2019 buttons for adding a new cell as shown below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"114\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194632\/Start-code-here.jpg\" alt=\"How to Use Command Mode and Edit Mode in Jupyter\" class=\"wp-image-45183\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194632\/Start-code-here.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194632\/Start-code-here-300x39.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194632\/Start-code-here-768x101.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194632\/Start-code-here-260x34.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-7-publishing-reports-available-for-workspace-only\"><span class=\"ez-toc-section\" id=\"7_publishing_reports_available_for_workspace_only\"><\/span>7. Publishing Reports (Available for Workspace only)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>In the workspace, you can publish your notebook via \u2018Publish\u2019 button available on the side menu. You can also check your notebook from top to bottom, before publishing to ensure the code is right. Once it is published, other users can also view the notebook and add comments in the individual cells.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194616\/Not-publish-yet.jpg\" alt=\"publish your notebook via \u2018Publish\u2019 button\" class=\"wp-image-45180\" style=\"width:500px\" width=\"500\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194616\/Not-publish-yet.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194616\/Not-publish-yet-300x178.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194616\/Not-publish-yet-768x454.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194616\/Not-publish-yet-260x154.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-8-sharing-jupiter-notebooks-available-for-workspace-only\"><span class=\"ez-toc-section\" id=\"8_sharing_jupiter_notebooks_available_for_workspace_only\"><\/span>8. Sharing Jupiter Notebooks (Available for Workspace only)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The option to share your notebooks is only available with Workspace. For that purpose, select the share button on the top right. When you select it, you can copy the link to share it. Moreover, you can create private and public access to the file as shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194627\/Sharing-Jupiter-Notebooks.jpg\" alt=\"Sharing Jupiter Notebooks\" class=\"wp-image-45182\" style=\"width:500px\" width=\"500\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194627\/Sharing-Jupiter-Notebooks.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194627\/Sharing-Jupiter-Notebooks-300x99.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194627\/Sharing-Jupiter-Notebooks-768x254.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194627\/Sharing-Jupiter-Notebooks-260x86.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-9-naming-the-notebook\"><span class=\"ez-toc-section\" id=\"9_naming_the_notebook\"><\/span>9. Naming the Notebook<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The created notebook is named as Untitled by default in Jupyter Notebook. For renaming the file, open the word Untitled. This will open a dialogue box named Rename Notebook where you need to add a name and then click ok.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"867\" height=\"344\" src=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194609\/Naming-the-Notebook.jpg\" alt=\"Naming the Jupytr Notebook\" class=\"wp-image-45179\" srcset=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194609\/Naming-the-Notebook.jpg 867w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194609\/Naming-the-Notebook-300x119.jpg 300w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194609\/Naming-the-Notebook-768x305.jpg 768w, https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194609\/Naming-the-Notebook-260x103.jpg 260w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-10-notebook-extensions\"><span class=\"ez-toc-section\" id=\"10_notebook_extensions\"><\/span>10. Notebook Extensions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Jupyter offers four types of extensions including Kernel, IPyhton Kernel, Notebook, and Notebook server. Many extensions can be installed via Python\u2019s pip tool. Other extensions can be installed by using the given command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>jupyter nbextension install extension_name<\/code><\/pre>\n\n\n\n<p>This command will only install the extension. However, to enable it, you need to type the following command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-most-common-keyboard-shortcuts-available-in-jupyter-notebook\"><span class=\"ez-toc-section\" id=\"most_common_keyboard_shortcuts_available_in_jupyter_notebook\"><\/span>Most Common Keyboard Shortcuts Available in Jupyter Notebook<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are multiple types of Keyboard shortcuts available in Jupyter through which you can use different commands. Here is the list of some of the most common Keyboard shortcuts in Jupyter:<\/p>\n\n\n\n<ol>\n<li>Toggle between edit and command mode with <code>Esc<\/code> and <code>Enter<\/code>, respectively.<\/li>\n\n\n\n<li>Once you are in command mode:<\/li>\n<\/ol>\n\n\n\n<ul>\n<li>Scroll up and down your cells with your <code>Up<\/code> and <code>Down<\/code> keys.<\/li>\n\n\n\n<li>Press <strong>A<\/strong> or <strong>B<\/strong> to add a new cell above and below the active cell.<\/li>\n\n\n\n<li><strong>M<\/strong> will transform the active cell into a Markdown cell.<\/li>\n\n\n\n<li><strong>Y<\/strong> will transform the active cell to a code cell.<\/li>\n\n\n\n<li><strong>D<\/strong> + <strong>D<\/strong> (<strong>D<\/strong> twice) will remove the active cell.<\/li>\n\n\n\n<li><strong>Z<\/strong> will undo cell deletion.<\/li>\n\n\n\n<li>Hold <code>Shift<\/code> and press <code>Up or Down<\/code> to select cells simultaneously. With multiple cells selected, <code>Shift + M<\/code> will club your selection.<\/li>\n\n\n\n<li><code>Ctrl + Shift + -<\/code>, in edit mode, will split the active cell at the cursor.<\/li>\n\n\n\n<li>You can also click and <code>Shift + Click<\/code> in the margin to the left of your cells to select them.<\/li>\n<\/ul>\n\n\n\n<style>\n.lh-callout, .lh-featured-snippet {\n    border: 1px solid #e9e9ea;\n    border-left: 8px solid #ff492c;\n    border-radius: 20px;\n    margin-bottom: 20px;\n    padding: 35px;\n    position: relative;\n}\n<\/style>\n<div class=\"lh-callout lh-featured-snippet\" class=\"has-background\" style=\"background-color:#FAC7B917\">\n  <p><strong>Conclusion:<\/strong> In this article, you might have got familiar with a lot of things that you can do in Jupyter Notebook including its creation and code modifications. We have covered most of the functions that you can do with Jupyter Notebook in the above article. If you want to learn more about their functions in detail, you can visit their documentation page and search for the functions you want to learn more about. <\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-faqs-related-to-jupyter-notebook\"><span class=\"ez-toc-section\" id=\"faqs_related_to_jupyter_notebook\"><\/span>FAQs Related to Jupyter Notebook<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"saswp-faq-block-section\"><ol style=\"list-style-type:none\"><li style=\"list-style-type: none\"><h3><span class=\"ez-toc-section\" id=\"can_i_run_a_jupyter_notebook_from_command_line\"><\/span>Can I run a Jupyter Notebook from command line?<span class=\"ez-toc-section-end\"><\/span><\/h3><p class=\"saswp-faq-answer-text\">Yes, you can run Jupyter Notebook from command line in the terminal.<\/p><li style=\"list-style-type: none\"><h3><span class=\"ez-toc-section\" id=\"how_do_i_run_a_jupyter_notebook_in_anaconda\"><\/span>How do I run a Jupyter Notebook in Anaconda?<span class=\"ez-toc-section-end\"><\/span><\/h3><p class=\"saswp-faq-answer-text\">To run a Jupyter Notebook in Anaconda, you need to open Anaconda Navigator via the Windows start menu and choose [Anaconda3(64-bit)] \u2013> [Anaconda Navigator] to create notebooks.<\/p><li style=\"list-style-type: none\"><h3><span class=\"ez-toc-section\" id=\"how_to_add_image_in_jupyter_notebook\"><\/span>How to add image in Jupyter Notebook?<span class=\"ez-toc-section-end\"><\/span><\/h3><p class=\"saswp-faq-answer-text\">You can add images in Jupyter Notebook directly via edit menu, or by using a python code. Moreover, you can add it by embedding it in a markdown cell.<\/p><li style=\"list-style-type: none\"><h3><span class=\"ez-toc-section\" id=\"how_to_add_text_in_jupyter_notebook\"><\/span>How to add text in Jupyter Notebook?<span class=\"ez-toc-section-end\"><\/span><\/h3><p class=\"saswp-faq-answer-text\">You can use its Text Box for adding text in Notebooks.<\/p><li style=\"list-style-type: none\"><h3><span class=\"ez-toc-section\" id=\"how_to_add_titles_in_jupyter_notebook\"><\/span>How to add titles in Jupyter Notebook?<span class=\"ez-toc-section-end\"><\/span><\/h3><p class=\"saswp-faq-answer-text\">Utilize the number sign (#) followed by a blank space for notebook titles and section headings: # for titles. ## for major headings. ### for subheadings.<\/p><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>Summary: With Jupyter Notebook, you can write codes, edit notebook cells, or even restart the entire program in a single notebook. Let&#8217;s learn how you can perform these functions in detail in the tutorial below. Jupyter Notebook allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Whether you&#8217;re [&hellip;]<\/p>\n","protected":false},"author":168,"featured_media":45174,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9364],"tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.2 (Yoast SEO v22.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Use Jupyter Notebook: A Comprehensive Guide<\/title>\n<meta name=\"description\" content=\"Use this guide to understand how to create Jupyter Notebook, learn important terminology, and share and publish notebooks online.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Jupyter Notebook: A Comprehensive Guide\" \/>\n<meta property=\"og:description\" content=\"Use this guide to understand how to create Jupyter Notebook, learn important terminology, and share and publish notebooks online.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169\" \/>\n<meta property=\"og:site_name\" content=\"Techjockey.com Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Techjockey\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-19T06:35:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-04T12:39:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194541\/How-to-Use-Jupyter-Notebook.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Varsha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TechJockeys\" \/>\n<meta name=\"twitter:site\" content=\"@TechJockeys\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Varsha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use Jupyter Notebook: A Comprehensive Guide","description":"Use this guide to understand how to create Jupyter Notebook, learn important terminology, and share and publish notebooks online.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169","og_locale":"en_US","og_type":"article","og_title":"How to Use Jupyter Notebook: A Comprehensive Guide","og_description":"Use this guide to understand how to create Jupyter Notebook, learn important terminology, and share and publish notebooks online.","og_url":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169","og_site_name":"Techjockey.com Blog","article_publisher":"https:\/\/www.facebook.com\/Techjockey\/","article_published_time":"2023-12-19T06:35:19+00:00","article_modified_time":"2024-10-04T12:39:46+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194541\/How-to-Use-Jupyter-Notebook.png","type":"image\/png"}],"author":"Varsha","twitter_card":"summary_large_image","twitter_creator":"@TechJockeys","twitter_site":"@TechJockeys","twitter_misc":{"Written by":"Varsha","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#article","isPartOf":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook"},"author":{"name":"Varsha","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/person\/6b8e959336e8c876369bdcc8da086d6d"},"headline":"How to Use Jupyter Notebook: A Comprehensive Guide","datePublished":"2023-12-19T06:35:19+00:00","dateModified":"2024-10-04T12:39:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook"},"wordCount":1297,"publisher":{"@id":"https:\/\/www.techjockey.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#primaryimage"},"thumbnailUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194541\/How-to-Use-Jupyter-Notebook.png","articleSection":["Productivity Software"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook","url":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook","name":"How to Use Jupyter Notebook: A Comprehensive Guide","isPartOf":{"@id":"https:\/\/www.techjockey.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#primaryimage"},"image":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#primaryimage"},"thumbnailUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194541\/How-to-Use-Jupyter-Notebook.png","datePublished":"2023-12-19T06:35:19+00:00","dateModified":"2024-10-04T12:39:46+00:00","description":"Use this guide to understand how to create Jupyter Notebook, learn important terminology, and share and publish notebooks online.","breadcrumb":{"@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#primaryimage","url":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194541\/How-to-Use-Jupyter-Notebook.png","contentUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2023\/12\/18194541\/How-to-Use-Jupyter-Notebook.png","width":1200,"height":628,"caption":"How to Use Jupyter Notebook feature image"},{"@type":"BreadcrumbList","@id":"https:\/\/www.techjockey.com\/blog\/how-to-use-jupyter-notebook#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techjockey.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Productivity Software","item":"https:\/\/www.techjockey.com\/blog\/category\/productivity-software"},{"@type":"ListItem","position":3,"name":"How to Use Jupyter Notebook: A Comprehensive Guide"}]},{"@type":"WebSite","@id":"https:\/\/www.techjockey.com\/blog\/#website","url":"https:\/\/www.techjockey.com\/blog\/","name":"Techjockey.com Blog","description":"","publisher":{"@id":"https:\/\/www.techjockey.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techjockey.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.techjockey.com\/blog\/#organization","name":"Techjockey Infotech Private Limited","url":"https:\/\/www.techjockey.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2019\/12\/logo.png","contentUrl":"https:\/\/cdn.techjockey.com\/blog\/wp-content\/uploads\/2019\/12\/logo.png","width":72,"height":72,"caption":"Techjockey Infotech Private Limited"},"image":{"@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Techjockey\/","https:\/\/twitter.com\/TechJockeys","https:\/\/www.linkedin.com\/company\/techjockey","https:\/\/www.youtube.com\/@techjockeydotcom"]},{"@type":"Person","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/person\/6b8e959336e8c876369bdcc8da086d6d","name":"Varsha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techjockey.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fa75be1f87041963cdb9cd24b76aa8d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fa75be1f87041963cdb9cd24b76aa8d0?s=96&d=mm&r=g","caption":"Varsha"},"description":"Varsha is an experienced content writer at Techjockey. She has been writing since 2021 and has covered several industries in her writing like fashion, technology, automobile, interior design, etc. Over the span of 1 year, she has written 100+ blogs focusing on security, finance, accounts, inventory, human resources, etc. Her expertise is centered around writing articles on cloud computing, cloud migration, and data security. Being a keen learner, she is constantly improving herself in the field of software and technology.","sameAs":["https:\/\/www.linkedin.com\/in\/varsha-sharma-1b4b8018a\/"],"gender":"Female","knowsAbout":["Marketing and Business"],"jobTitle":"Content Writer","worksFor":"Techjockey Infotech Pvt. Ltd.","url":"https:\/\/www.techjockey.com\/blog\/author\/varsha"}]}},"_links":{"self":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169"}],"collection":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/users\/168"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/comments?post=45169"}],"version-history":[{"count":4,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169\/revisions"}],"predecessor-version":[{"id":45188,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/posts\/45169\/revisions\/45188"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/media\/45174"}],"wp:attachment":[{"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/media?parent=45169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/categories?post=45169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techjockey.com\/blog\/wp-json\/wp\/v2\/tags?post=45169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}