Introduction

You’ve just written an amazing Jupyter Notebook, and you’d like to send it to your coworkers. Asking them to install Jupyter isn’t an option, and neither is asking IT for a server on which to host your page. What do you do?

I’ll show you how to export your notebook as a self-contained html report which anyone can open in their browser. I’ll start with the simplest possible example of how to export an html report, then I’ll show how to hide the input cells, and finally I’ll show how to toggle showing/hiding code cells.

Hello world example

Let’s start with the simplest possible example — we have a “hello world” notebook and we’d like to export it as a self-contained html report. We can do this by running

$ jupyter nbconvert notebooks/hello_world.ipynb --output-dir build

#python #jupyter-notebook #jupyterlab #report #jupyter

Self-contained reports from Jupyter Notebooks
7.05 GEEK