Reference · English

Notebook guides

How an .ipynb file is put together, what each export keeps, how to clean a notebook before you share it, and how to read one without installing Jupyter. The shorter articles are on this same page. Written and updated by Khalid Danishyar. These pages stand on their own. The tools are optional.

Guides

  1. Diagram of an ipynb file: nbformat, metadata, and an ordered list of cells with source and outputs
    01

    What an .ipynb file actually contains

    A notebook is JSON: cells, saved outputs, and metadata. What is stored, what is only a recording of a past run, and what never makes it into the file.

    Read
  2. A chart saved as a notebook output, the kind of image that is stored inside the .ipynb JSON
    02

    Why a notebook file becomes huge

    Plots, HTML tables, printed logs, and widget state are stored inside the JSON. How to find the heavy cell, and what stripping outputs changes.

    Read
  3. A notebook opened for reading, with cells visible and no kernel required to inspect metadata
    03

    What notebook metadata from Colab, JupyterLab, and VS Code actually means

    Kernelspec, language_info, cell ids, and editor keys are notes about the last editor. They are not the packages, the data, or a promise the file will run.

    Read
  4. Reading a notebook locally, where saved outputs are displayed without starting a kernel
    04

    HTML outputs, and when Jupyter calls a notebook trusted

    Saved HTML and SVG can do more than show a table. Trust is a local Jupyter decision. It does not travel with the file you email.

    Read
  5. A Jupyter notebook beside an exported file, showing that the export is a copy of saved cells rather than a new run
    05

    What each notebook export keeps and drops

    PDF, Word, Markdown, HTML, and Python keep different parts of a notebook. A format-by-format comparison of source, outputs, images, and what cannot round-trip.

    Read
  6. Notebook preview after outputs are stripped, with code and markdown still visible
    06

    How to clean a notebook before you share it

    Outputs, execution counts, tokens, and printed data are part of the file. A checklist for what to strip, what to keep, and how to search before you send an .ipynb.

    Read
  7. Notebook preview with markdown and code cells before a PDF export
    07

    A worked example: one sample notebook, five exports

    Follow the public sample notebook through PDF, Word, Markdown, HTML, and Python. What you should see, what is missing on purpose, and how to tell a setting from a bug.

    Read
  8. A notebook opened for reading, with markdown, code, and saved output visible and no kernel running
    08

    How to read a notebook when Jupyter is not installed

    Reading a notebook is parsing JSON and showing saved cells. It does not require a kernel. When to use a text editor, when to use a viewer, and what not to run.

    Read

Articles

Practice on the sample notebook. It has no secrets and one saved text output.