Browse Courses

Starting Jupyter

This document provides a comprehensive introduction to Jupyter, a freely available web application for interactive computing. It covers Jupyter's key features, advantages for data science, and practical guidance on operating notebooks, including cell management, working with multiple notebooks presenting results, and managing sessions.

This document introduces Jupyter, a powerful web-based interactive computing platform supporting multiple programming languages. It explores Jupyter's key features, integration with data science libraries, collaboration capabilities, and provides practical guidance on notebook operations including cell management, multi-notebook workflows, result presentation, and session management for efficient data science work.


Introduction

Jupyter is a freely available web application that enables creation and sharing of documents containing equations, live coding, visualizations, and narrative text. Jupyter provides an interactive computing environment that supports multiple programming languages, including Python, R, Julia, and more, but it shines brightest when used with Python. Jupyter revolves around notebooks, documents containing a mix of code, visualizations, narrative text, equations, and multimedia content. These notebooks allow users to create, share, and collaborate on computational projects seamlessly.


Why Jupyter?

Jupyter’s popularity stems from its flexibility and ease of use. Regardless of the level of programming expertise, whether experienced or embarking on a data science journey, Jupyter offers an intuitive platform for writing, testing, and sharing code. Its interactive interface enables data exploration, algorithm experimentation, and result visualization—all seamlessly integrated within a unified environment.


Key Features of Jupyter

Jupyter offers several powerful features that make it indispensable for data science and interactive computing.

Interactive Computing

Jupyter notebooks enable users to write and execute code interactively. Code cells can be run individually with immediate output visibility, fostering an iterative approach to coding and experimentation.

Support for Multiple Languages

While Jupyter was initially developed for Python (the name stands for Julia, Python, and R), it now supports various programming languages through its kernel system. This flexibility makes Jupyter suitable for diverse computational tasks and interdisciplinary collaboration.

Rich Output

Jupyter Notebooks support rich media integration, allowing generation of interactive plots, charts, images, videos, and more directly within the document. This makes visualizing data, communicating findings, and creating compelling narratives easier.

Integration with Data Science Libraries

Jupyter seamlessly integrates with popular libraries and frameworks used in the data science ecosystem, such as NumPy, Pandas, Matplotlib, scikit-learn, TensorFlow, and PyTorch. This allows users to leverage the full power of these tools within the notebook environment for tasks like data manipulation, visualization, machine learning, and deep learning.

Collaboration and Sharing

Jupyter promotes collaboration and reproducibility by allowing users to share their notebooks with others via email, GitHub, or the Jupyter Notebook Viewer. This facilitates knowledge sharing, peer review, and interdisciplinary collaboration, as users can easily exchange ideas, code snippets, and best practices.


Jupyter in Data Science

Jupyter has become an indispensable tool for researchers, analysts, and developers in data science. Its seamless integration with popular libraries such as NumPy, pandas, and scikit-learn makes it the go-to choice for data manipulation, analysis, and machine learning. Jupyter provides a user-friendly interface, interactive capabilities, and robust collaboration features, making it an essential tool for anyone involved in data analysis, scientific research, education, or software development. Whether exploring data, building machine learning models, teaching a class, or conducting research, Jupyter empowers efficient work and insight sharing.


Getting Started with Jupyter

With an understanding of what Jupyter offers, the following sections provide practical guidance on setting up and using Jupyter notebooks effectively.


Managing Cells in Jupyter Notebooks

Cells are the fundamental units in Jupyter notebooks, allowing code execution and documentation.

Running Cells

To execute code in a cell:

  • Click the Run button in the toolbar.
  • Use the menu: Run > Run Selected Cells.
  • Use the shortcut: Shift + Enter.
  • To run all cells: Run > Run All Cells.

Inserting and Deleting Cells

  • Insert a new cell by clicking the plus (+) symbol in the toolbar.
  • Delete a cell by highlighting it, then selecting Edit > Delete Cells, or pressing D twice on the highlighted cell.
  • Cells can be moved up or down as needed.

Working with Multiple Notebooks

Jupyter supports opening and managing multiple notebooks simultaneously.

  • Open another notebook by clicking the plus button in the toolbar and selecting the desired file.
  • Alternatively, use File > Open a new launcher or File > Open a new notebook.
  • Notebooks can be arranged side by side for comparison or multitasking.

Example:

1# Assign values and print the sum
2one = 1
3two = 2
4print(one + two)

Presenting Results in Jupyter

Communicating results is essential in data science. Jupyter notebooks support presentation features:

Using Markdown

  • Add titles and text descriptions by converting a cell to Markdown (Code > Markdown).
  • Use Markdown to structure content and improve readability.

Creating Slides

  • Convert cells and outputs into slides or sub-slides for presentations.
  • Slides allow delivery of code, visualizations, text, and outputs as part of a project.

Shutting Down Notebook Sessions

Properly shutting down notebooks releases memory and ensures resources are managed.

  • Click the stop icon on the sidebar (second from the top) to terminate sessions.
  • Shut down all sessions at once or individually.
  • After shutdown, “no kernel” appears at the top right, confirming inactivity.
  • Tabs can be closed safely after shutdown.

Conclusion

Jupyter provides a powerful, flexible environment for interactive computing, data science, and collaborative work. Its support for multiple programming languages, rich media integration, and seamless library integration make it an essential tool for modern data analysis and research. Mastering cell management, working with multiple notebooks, leveraging presentation features, and proper session management unlocks Jupyter’s full potential for productive and efficient computational work.


FAQ

Running all cells can be achieved by selecting Run > Run All Cells from the menu or using the dedicated toolbar button.

Markdown cells are used to add titles, text descriptions, and structure to notebooks, improving readability and supporting presentations.

  1. Selecting Edit > Delete Cells
  2. Pressing D twice on the highlighted cell
  3. Clicking the plus (+) symbol in the toolbar
  4. Highlighting the cell and using the menu
(3) The plus (+) symbol is used to insert a new cell, not delete one.

The appearance of “no kernel” at the top right of the notebook interface confirms the session is inactive.

Multiple notebooks can be opened by clicking the plus button in the toolbar and selecting files, or by using File > Open a new launcher or notebook.

ActionDescription
A. Insert cell1. Remove a cell from the notebook
B. Delete cell2. Add a new cell to the notebook
C. Move cell3. Change the position of a cell
D. Run cell4. Execute code in the selected cell
A-2, B-1, C-3, D-4.

Jupyter notebooks allow arranging multiple open notebooks side by side for comparison or multitasking.

True. Multiple notebooks can be opened and arranged for simultaneous work.

Shutting down a notebook session releases memory and resources, ensuring efficient management and confirming inactivity.

Pressing Shift + Enter runs the currently highlighted cell in Jupyter notebooks.

Jupyter’s slides functionality enables delivery of code, visualizations, text, and outputs as part of a project presentation.