Skip to content

🧹 A script used to reset a Jupyter notebook's execution cell indexes, making them increase from 1.

License

Notifications You must be signed in to change notification settings

Zhuagenborn/Jupyter-Cell-Index-Resetter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jupyter Cell Index Resetter

PowerShell Jupyter License

Introduction

Cover

This script can reset a Jupyter notebook's execution cell indexes, making them increase from 1.

Usage

You need to specify an original Jupyter file and an output path.

PS> .\Reset-JupyterCellIndex.ps1 -InputPath 'origin.ipynb' -OutputPath 'new.ipynb'

Warning

Variable values in cells may be different according to execution order. Users should make sure variables are correct by themselves.

In  [2]: a = 1
In  [1]: a = 0
In  [3]: a
Out [3]: 1

For example, the above cells will become the following content after resetting:

In  [1]: a = 1
In  [2]: a = 0
In  [3]: a
Out [3]: 1

The output of variable a is incorrect according to the new execution order.

License

Distributed under the MIT License. See LICENSE for more information.

About

🧹 A script used to reset a Jupyter notebook's execution cell indexes, making them increase from 1.

Topics

Resources

License

Stars

Watchers

Forks