veseln / clean_ipynb

cleanup messy jupyter notebooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cleanipynb

This package will cleanup your jupyter notebook by:

  • removing unused imports (globally)
  • moving all imports to the first cell and reordering them
  • reformatting your code with autopep8

All this with preserving the cell structure thanks to jupytext smart export to python features.

WARNING: Cleaning happens in-place - Be careful

Usage:

pip install cleanipynb
cleanipynb path_to_your_notebook.ipynb

Demo:

Credits:

  • jupytext
  • importanize
  • autoflake
  • autopep8

About

cleanup messy jupyter notebooks

License:MIT License


Languages

Language:Python 46.5%Language:Makefile 37.7%Language:Jupyter Notebook 15.8%