Close Navigation
Learn more about IBKR accounts
Jupyter Notebook Tutorial: Installation, Components and Magic Commands – Part V

Jupyter Notebook Tutorial: Installation, Components and Magic Commands – Part V

Posted March 1, 2023
Jay Parmar
QuantInsti

See Part I for an overview of Jupyter Notebook, Part II for the different components of Jupyter Notebooks, Part III for instructions on how to write down in Markdown in Jupyter Notebooks and Part IV for how to insert an image in a markdown cell.

How to download and share Jupyter Notebook?

Being a programmer, you often want the work that you have done to be shared with other colleagues. Keeping this in mind, Jupyter environment allows you to download files in multiple formats such as HTML file(.html), LaTeX file(.tex), GitHub flavoured Markdown file(.md), PDF file(.pdf), reStructured file(.rst), and so on. The Download as option in the File menu allows you to download the notebook in a format of your choice, as shown below:

When you download a notebook, it will be downloaded in whatever state it is. That is the output of executed cells, any error that you might have as an output will be as it is. Hence, it is essential that you make a notebook ready to be shared. To do so, you can perform the following steps:

  1. Go to Cell menu, select All Output option, and finally choose the Clear option. This action will clear the output of all cells.
  2. Next, go to Kernel menu, and select the Restart & Run All option. This action will restart the kernel and execute all cells.

After performing the above steps, ensure that the notebook is in the state in which you would like to share with others.

Besides exporting notebooks to your local workstation, you can create, list and load it on GitHub Gists. Gists are a way to share your work on the cloud. You can find more information here.

Also, you can use JupyerHub, which serves Jupyter notebooks to multiple users. In other words, it is the hosting platform for notebooks on a server with multiple users.

Additionally, you can use the nbviewer to render Jupyter notebooks as static web pages. Platforms such as RISE and nbpresent allow you to convert Jupyter notebooks to slideshows.

Final Thoughts

I hope this introductory guide to Jupyter notebooks provides you with the foundation. In this relatively a multi-part article, First, I started with the explanation of Jupyter notebook, its installation process, running locally on your workstation and so on. Next, during the process, you also got exposed to various components of Jupyter notebooks and keyboard shortcuts. Then, you learnt writing in markdown language. After that, you learnt various magic commands in Jupyter notebook. Finally, you learnt how to download and share Jupyter notebooks.

Thanks for reading.

Originally posted on QuantInsti Blog: https://blog.quantinsti.com/jupyter-notebook-tutorial-installation-components-magic-commands/.

Disclosure: Interactive Brokers

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from QuantInsti and is being posted with its permission. The views expressed in this material are solely those of the author and/or QuantInsti and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.