Jupyter Notebook

repository·main·Indexed 12 days ago

https://github.com/jupyter/notebook

A web-based, language-agnostic environment for interactive computing that allows users to create and share documents containing live code, equations, visualizations, and narrative text. Supports Notebook v7 (built with JupyterLab components and Jupyter Server) and Classic Notebook v6. Features include a command palette, Zen Mode, theme customization, and a federated extension system for adding third-party functionality via pip.

Tokens
28.4K
Snippets
105
Records
164
Agent score
96%

What's inside Jupyter Notebook

  1. Overview of Notebook 7 features

    main

    Notebook 7 introduces several modern features while maintaining the classic document-centric user experience (where each notebook opens in a separate browser tab). Key features include:

    • Debugger: Allows stepping through code cell by cell, setting breakpoints, and inspecting variables.
    • Real Time Collaboration: Shared editing via the jupyter-collaboration extension.
    • Table of Contents: A built-in sidebar for notebook navigation (enabled by default).
    • Theming: Built-in Dark Mode and support for JupyterLab themes.
    • Accessibility: Uses CodeMirror 6 for improved text editor accessibility.
    • Mobile Support: Automatically switches to a compact layout on mobile devices.
  2. What is Jupyter Notebook

    main

    Jupyter Notebook is a lightweight, simplified notebook authoring application used for interactive computing. It allows users to create shareable documents that combine:

    • Computer code
    • Plain language descriptions
    • Data
    • Rich visualizations (3D models, charts, graphs, figures)
    • Interactive controls

    It is part of Project Jupyter and serves as a simplified alternative to JupyterLab.

  3. Identify Jupyter Notebook UI components

    main

    When reporting bugs or communicating with the Jupyter community, use the following standard names for the primary interface components to ensure clarity:

    • Notebook Dashboard: The initial landing page encountered after launching jupyter notebook.
    • Notebook Editor: The interface used for interacting with and editing .ipynb files.
    • File Editor: The interface used for editing non-notebook files (e.g., Markdown files) opened from the Dashboard.
    • Cell Mode Indicator: A visual indicator in the Notebook Editor that shows the current state of a cell.
    • Menubar: The top navigation bar containing menus like Help.
  4. What is the Help Pager and how to use it

    main

    The Pager is a feature that displays help documentation, function signatures, object information, and module documentation directly within the notebook interface. It renders content typically associated with Python's help() function or IPython's ? and ?? operators.

    You can trigger the pager using standard Python or IPython commands in a cell:

    # Show help for a function
    help(print)
    
    # IPython magic for quick help
    print?
    
    # Detailed help with source code
    print??
  5. Distinguish between Edit Mode and Command Mode in the Notebook Editor

    main

    The Notebook Editor operates in two primary modes for cells, which can be identified by the Cell Mode Indicator located at the top right of the cell interface:

    • Edit Mode: Indicated by a small pencil icon in the top right of the cell. This mode is used for typing content into a cell.
    • Command Mode: Indicated by the absence of an icon in the top right location. This mode is used for cell-level actions (like adding, deleting, or moving cells).
  6. Understand the Notebook 7 extension system

    main
    Notebook 7 is built on the same extension system as JupyterLab. This means that extensions are managed as plugins, and a single extension can provide multiple distinct plugins to the application. For advanced extension development or management, refer to the official JupyterLab documentation.
  7. Understand Server Extensions in Notebook 7

    main

    Notebook 7 is built on top of Jupyter Server. Unlike the classic notebook server, Jupyter Server is a standalone application designed to host multiple Jupyter applications (such as Notebook, JupyterLab, and NBClassic) simultaneously.

    Because of this architecture, Notebook 7 can reuse many existing server extensions from the broader Jupyter ecosystem without modification.

  8. Understand the structure of a notebook document

    main

    A Jupyter Notebook consists of a sequence of cells. Each cell is a multiline text input field that can be executed to produce output. There are three types of cells:

    1. Code cells: Used to write and edit code. The execution behavior depends on the associated kernel (e.g., IPython for Python). Code is sent to the kernel, and results (text, matplotlib figures, HTML tables, etc.) are displayed as rich output.
    2. Markdown cells: Used for literate programming and documentation. They support Markdown syntax for text formatting and headings. Markdown cells also support LaTeX for mathematics using $...$ (inline) or $$...$$ (displayed) delimiters, rendered via MathJax.
    3. Raw cells: Used to write output directly without evaluation. These cells are passed through nbconvert unmodified, making them useful for writing raw LaTeX that should only be rendered during conversion.

    You can change a cell's type using the drop-down menu on the toolbar.