ReviseAlgo Logo

Data Science Essentials

Jupyter Notebooks

An open-source web application for creating documents containing live code, visualizations, and narrative text.

Interview: Standard development environment for data scientists. Tested on interactive cell executions, kernel states, and workflow best practices.

Last Updated: June 12, 2026 6 min read

Jupyter Notebook is an interactive web-based computing environment. It allows developers to bundle executable code cells, Markdown documentation, equations, and rich media plots into a single document format (.ipynb).

Notebook Cell Execution

Notebooks are stateful. Code cells can be run in any order. The state of the variables is kept in the background Python process (called the Kernel) until the kernel is restarted.

Command vs. Edit Modes

Jupyter uses two keyboard shortcut modes:

  • Edit Mode (Green border): Press Enter to type code into a cell.
  • Command Mode (Blue border): Press Esc to perform document-level actions (e.g. A to insert cell above, B to insert below, DD to delete cell, M to change cell to Markdown).

Use Cases

Exploratory Data Analysis — Slicing and viewing data subsets interactively to find trends.

Sharing Analysis — Exporting `.ipynb` notebooks to HTML or PDF to present findings directly to stakeholders.

Prototyping Algorithms — Developing complex data transformations step-by-step.

Common Mistakes

Out-of-order execution — Running cells in a non-sequential order, leading to code that crashes when run from top-to-bottom on restart.

Leaving notebooks in run state — Keeping heavy datasets loaded in active notebook kernels on shared servers, blocking RAM.

Not clean-committing to Git — Committing notebooks with massive output charts and metadata to Git (use "Clear All Outputs" before committing).