dan-r95 / clean_ipynb

:nail_care:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cleannb is a command line program for cleaning jupyter notebook.

It removes empty cells, clears output, and formats code written in python (using isort and black) and (coming soon) julia (using CleanCode.jl).

Official janitor of Google Colab.

Install

pip install git+https://github.com/KwatME/CleanNB.py

Use

cleannb a.ipynb
cleannb a.ipynb b.ipynb
cleannb *.ipynb
find . -name "*.ipynb" -exec cleannb {} \;

Test

notebook/dirty.ipynb is a dirty notebook. (Make it dirtier and submit your pull request.)

Let's clean it:

cleannb --new notebook/dirty.ipynb

And look at the result notebook/dirty.clean.ipynb.

About

:nail_care:

License:Other


Languages

Language:Jupyter Notebook 74.1%Language:Python 25.9%