Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Why Use Jupyter Notebooks?

This lesson introduces Jupyter Notebooks, an open source web application that you can use to create and share documents that contain live code, equations, visualizations, and text. You’ll see reasons to use Jupyter Notebooks and what features they offer.

Download

Course Slides (PDF)

414.8 KB

00:00 Hey everyone! My name is Martin, and today we’re going to talk about Jupyter Notebooks. First, we’re going to talk about what they even are and why you should use them, then we’re going to go over the basic functionality and look at a bit of the advanced usage. Let’s get started! First on the list, why would you even want to use Jupyter?

00:18 So, one community that is using Jupyter Notebooks a lot is the scientific community, and there’s a good reason to that. Jupyter Notebooks solves a problem, which is that not everyone who wants to code something is necessarily a software developer, or is very excited about setting up a development environment, et cetera.

00:37 Coding environments can really be intimidating, so maybe when you are meant to get started to do some code for doing some analytics on a genomics data set, for example, you wouldn’t want to get started using Python inside of a REPL or with IDLE, which is the IDE that comes with Python. Or did maybe someone recommend you to use VIM? Or were you one of those that started off using one of the advanced IDEs?

01:03 And maybe if you’re new to this, what does all of this even mean?

01:08 So, what you can see here is a REPL. It’s the simplest way of getting in to Python. You open up your terminal and you type python and then it opens up this Python interpreter.

01:19 It’s great because you can type something and you can right away see the output of your code, which can be very useful. At the same time, it doesn’t support persistent code. It’s a one-off thing. Once you wrote it, it’s gone.

01:33 There’s other ways to do that. One of them is using an IDE—

01:38 I’m showing you one of the more involved ones. There’s also stuff in between, like text editors where you can write files. But IDEs solve this problem that you can write persistent code and keep it around, reuse it, run it again—but they can be very complex, and it’s difficult to figure out where to even get started.

01:54 There’s so many options and they solve a lot of problems, but you just want to get this thing done, you know?

02:01 Learning all the bells and whistles of an IDE is a task that you don’t really want to do, or just don’t have the time for. So, Jupyter Notebooks combines the good of both.

02:13 This means that you can get a Read-Evaluate-Print Loop—that’s the REPL acronym. In Jupyter Notebooks, you can get your output right away, in one document. You write code, you see what it results to, and at the same time, you can also write persistent files.

02:29 So it has both those positive aspects, and it looks nice! Here’s a quick screenshot. We’re going to look at this more later on, but just to give you an idea. At the top, we have something that’s called a code cell, where you can write code and evaluate it. You can see this towards the bottom, where there’s the table.

02:48 The table is an output of some code that was written, and it displays right away. You can also write Markdown. This is just normal text, which you can see at the bottom.

02:59 You can create this intersection between code and text that follows very closely a thought process—that can be extremely helpful when exploring data, for example.

03:10 So, great features of Jupyter Notebooks are that you can run it right in your browser, you have separate code blocks that you can evaluate individually, and you can see the output of this code right inside of that document.

03:23 Everything lives in memory, which means that the outputs or the variables you assigned in one code block are also accessible in the other code blocks. Then, it integrates Markdown and code, so you can create these great thought process documents that record your thinking and your data exploration process in a very visual and easily-understandable way. Plus, it’s very easy to share the Notebooks online. GitHub, for example, displays Notebooks by default, and there’s also other ways for uploading them.

03:56 Finally, there’s a large community that supports Jupyter and uses the Notebooks—especially in science, for example. And there are many extensions that you can use and integrate in your Notebooks to customize the experience even more. So, let’s get started and I will show you how to install Jupyter Notebooks on your computer.

victorariasvanegas on June 14, 2019

VIM is for me better for scripting, but in machine learning I always use notebooks, thanks for the videos.

Michael on Nov. 21, 2020

Is there another tutorial you recommend next once this series is complete?

This was a helpful overview of Jupyter!

Ricky White RP Team on Nov. 22, 2020

Hi Michael,

We have lots of courses that can follow on from this. For me to recommend on that’s suitable, let me know what you’re looking to learn, and your skill level, and I can help you find the next best course for you.

Martin Breuss RP Team on Nov. 22, 2020

And if you want to dive deeper into the mechanics of using Jupyter Notebooks specifically, there are two free courses I found:

Everett McAdams on Feb. 7, 2024

Hey Martin,

I having a bit of a challenge getting the configuration of the notebook extensions you covered at the last. I get a failure every time I try to execute the “pip install jupyter_nbextenstions_configurator”. There is a failure of finding configurator. You mentioned in the video about the github for this but I didn’t find the github address for it.

Regards,

Mac

Martin Breuss RP Team on Feb. 7, 2024

@Everett McAdams check out the discussion on this in the comments of the Jupyter Notebooks Extensions lesson. Hope that helps!

Become a Member to join the conversation.