Jupyter Notebook Menu Items
The Jupyter Notebook has several menus that you can use to interact with your Notebook. This is a list of the menus:
This lesson will go over the menus one by one. You’ll learn how to use the menus to combine markdown text with code, create checkpoints, modify cells, change the way data is presented, add widgets, and how to use the Notebook’s keyboard shortcuts.
00:37 What I’m going to do now is I will change this one to a Markdown cell. You see that In disappears, and now I’m going to paste in a bit of text that I wrote before, which is essentially just us talking about the menu items.
You can see that it’s pre-formatted with this hashtag (
#) before—it’s going to make a heading. And then once I run this cell, you can see that it’s nicely formatted. It looks like HTML, essentially.
01:03 We’ll talk more about Markdown later on, but I wanted to show you how fun it is to use Jupyter Notebooks also for keeping your workflow intact and in one place, so I’m just going to use it for my notes for what we want to talk about in here. So, looking at the menu items, we have the File menu up here, and one of the important things in there—like, this is where you can make new Notebooks, where you can open Notebooks, et cetera, make a copy.
01:35 And one that is interesting to highlight is Save and Checkpoint. Even though Jupyter Notebooks saves the work automatically pretty frequently—so you don’t have to worry about it too much—but sometimes you can come here, click Save and Checkpoint, and then you will have the Checkpoint created, here, you’ll have the time, and from then on you have the possibility to revert back to a checkpoint that you created.
You can delete them and undo the deletions, et cetera. You can also split cells—let’s take a quick look at that. Depending on where I place my cursor—so, we’re currently at the
**Edit** menu, I will put it in here—and I can say Split Cell, and then it splits the cell at this point and we have two Markdown cells right here that I can run separately.
02:49 Here we can clean up a little. I can toggle the header, which we have up here. I can toggle the toolbar, make a bit more space, stay more focused. For now, we want to keep those because I want to talk a bit about the items.
03:44 The next one is the Cell menu item. In this one we can decide to run a cell, or run all of the cells at one point—this is often useful if you’re opening a Notebook anew that you’ve already written code in—sometimes you just want to run all the cells.
04:12 Because you might have the question “What is this Raw NBConvert?”—we’re going to talk about it a bit later, but it’s related to if you export a Jupyter Notebook, you can give some specific instructions on how to deal with that export.
04:48 There’s also a keyboard shortcut that is set to b, so pressing b inserts a cell below, and pressing a inserts a cell above. So, I would go here, select that and press a—then it inserts a cell above the currently selected cell.
Another way to change the type of cell that we already looked at quickly is you can come here and then select which cell you want. Heading here is a legacy, this doesn’t exist anymore. If I changed to Heading, we get this information that this is not meant to be used, so you just want to use Markdown for that. This would include a heading, and if we make a cell that would only contain a heading, we would do it like this: come here, change to Markdown, then
# Our heading, and execute.
06:14 Generally, you’re probably not going to deal with this very much. You can, in here, interrupt the kernel, restart it, or even change it to a different kernel. Currently, we just have access to a Python 3 one.
06:38 The second-to-last menu item here is the Widgets menu item. I currently don’t have anything in here, but you can install additional widgets that allow users of your Notebook or viewers of your Notebook to interact with data visualizations that you have. There’s map extensions, and then there’s 3D animation extensions—et cetera, et cetera—and you can access those over Widgets. And the final menu item is Help. In here, you can find help about Jupyter Notebooks, as well as something that’s useful to get the keyboard shortcuts up. And in here, you can always check up on what are useful keyboard commands.
07:19 There’s a lot of them, so don’t worry too much about it, but a couple of them are very useful and you’re going to be using some of them very frequently. For example, create cells, delete cells—or run a cell, with Shift + Enter.
Become a Member to join the conversation.