Use black code formatting in Jupyter (python)
Black is a code formatting library. It will format your code so you don’t have to. Here is how to use it in Jupyter:
Installation
Install with pip:
pip install nb_black
Usage
For Jupyter Notebook:
%load_ext nb_black
For Jupyter Lab:
%load_ext lab_black