• Skip to primary navigation
  • Skip to content
  • Skip to footer
michael harty
  • Posts
  • Tags
  • About
  • TIL
    Michael Harty

    Michael Harty

    I’m a geologist learning and using data science. Read about my projects and the things I’m learning.

    • Denver, CO :mountain:
    • GitHub
    • Twitter
    • LinkedIn

    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

    pypi link

    Updated: October 30, 2023

    Previous Next
    • GitHub
    • Twitter
    • LinkedIn
    • Feed
    © 2023 michael harty. Powered by Jekyll & Minimal Mistakes.