ReSplit: Improving the Structure of Jupyter Notebooks by Re-Splitting Their Cells

Sergey Titov, Yaroslav Golubev, Timofey Bryksin
12/29/2021
cs.SE

Official code: JetBrains-Research/ReSplit (6 stars, Jupyter Notebook, MIT, last commit 2026-01-13).

Abstract

Jupyter notebooks represent a unique format for programming - a combination of code and Markdown with rich formatting, separated into individual cells. We propose to perceive a Jupyter Notebook cell as a simplified and raw version of a programming function.

Show full abstract

Similar to functions, Jupyter cells should strive to contain singular, self-contained actions. At the same time, research shows that real-world notebooks fail to do so and suffer from the lack of proper structure. To combat this, we propose ReSplit, an algorithm for an automatic re-splitting of cells in Jupyter notebooks. The algorithm analyzes definition-usage chains in the notebook and consists of two parts - merging and splitting the cells. We ran the algorithm on a large corpus of notebooks to evaluate its performance and its overall effect on notebooks, and evaluated it by human experts: we showed them several notebooks in their original and the re-split form. In 29.5% of cases, the re-split notebook was selected as the preferred way of perceiving the code. We analyze what influenced this decision and describe several individual cases in detail.

View on arXivView PDF

Code Implementations(1)

MIT

An algorithm that re-splits Jupyter notebooks by merging and splitting their cells.

63Jupyter Notebook, PythonDec 24, 202110 months agoMIT

Similar Papers

Cite this paper

@article{titov2021resplit,
  title  = {ReSplit: Improving the Structure of Jupyter Notebooks by Re-Splitting Their Cells},
  author = {Sergey Titov and Yaroslav Golubev and Timofey Bryksin},
  year   = {2021},
  eprint = {2112.14825},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2112.14825}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2112.14825.svg)](https://codeofpaper.com/paper/2112.14825)

Discussion