Other Useful Features
00:16 The first point, therefore, is you can make really nice-looking Markdown reports, like using this Markdown feature and integration between code and Markdown. Yeah, you can do stuff like this. For example, have a table of contents in here where I can click around and it actually takes me to the different sections, right?
00:33 And you see it’s very nicely formatted right away, and that’s quite easy by just writing Markdown, where you can integrate HTML also, which I’ve done here—for example, making a link here so that we can then directly link to the different sections.
00:59 and by that—just by exporting it, finally—which you can do over here. Download as, for example, a PDF file—or you can just pick out the code. So, you can create a nice-looking report quite easily. Here, let’s see—we looked at that at the beginning, I want to show you again. Just creating some data, and then finally, I can have a plot that’s directly integrated here in my Notebook, so that it would also show up in the report that I’m generating. So that’s, I think, one of the most important features. Cool! Then the next one, the iPython magic commands.
This is something that comes with the iPython shell, so it’s not specific to Jupyter Notebooks in itself, but since Jupyter Notebooks are built on the iPython shell, you can use all the magic commands that come with it. So, there’s fun stuff, like, for example, this
%%time, which just gives you a quick way of seeing “How long did this code block take to execute?” And then there’s stuff like this
%%timeit, ha, which just runs your code block—it’s actually a hundred million times.
02:25 So, let’s go into the cell first. Now when I press Alt, you see that my cursor changes to a plus, and now when I hold it and I pull over that, and then I just pressed the Right arrow, so I have a couple of cursors here, so I can do nice stuff like this, also like this, go over, and then let’s just print them all out much quicker.
03:02 So here, I’m using a Bash command to just print what’s inside. You can see this is what’s currently in the folder that I’m in. I can create things—here I am creating a file, and then let’s print again.
And then we have a final thing that I want to show you because part of this whole data science, Jupyter Notebook—we have a nice representation of things that really looks good. It’s also like, how do you show it to people? You don’t want to send around
.ipynb files, so instead, you can easily create a link to show it to people.
But if we want to have it nicer formated, there’s this project called NBViewer, where you can paste in a URL, for example, to this GitHub thing that I just uploaded to this
.ipynb Notebook—wherever you’re hosting it, right?
04:08 It just has to be a Notebook. And I can press Go! and it displays it for me, nicely rendered. There you go. And this has a unique URL now that renders it in this format. I can show you this—if I have fetch this and open up a new incognito window…
04:28 it’s still available. So you can share this link with anyone in your organization or friends and they can easily see—like, they can easily follow your description of the code that you went through and yeah, experience this nice integration. All right!
Become a Member to join the conversation.