A Beginner’s Guide to Python for Data Science - Part 3 Introduction to Jupyter Notebooks

 


In the last article, we introduced the method to create a python project in PyCharm.


Now, it’s time to turn our attention to the jupyter notebook itself. We see different options, some code lines, something named “Untitled”, informing us about the last checkpoint, etc.


The first thing we can do is give our notebook a name.


We can do this by clicking on the ‘untitled’ area, and as soon as we click that, jupyter provides us with an input box to rename the file, as shown below:




We will name the notebook “Intro to Python”.

Now we will look at the options provided in the ribbon just before the quick options.
The first option in the ribbon is “File”. As soon as we click on it, we can see that all options relevant to handling the file, such as creating a new file, opening an existing file, and duplicating and saving files in multiple different formats, are available with a single button press.

The following screenshot gives you a quick view of all the options discussed above:




One of my favourite shortcuts is the “Shift + Enter” for running the current cell. This command runs the cell and generates a new empty cell below for us to keep working.


As we can see in the above image, as soon as we run the first cell using “Shift + Enter”, we receive an empty cell below, highlighted as the current cell indicated by the blue box surrounding it.
Now let’s say we want to insert cells above the current cell. We can achieve this by pressing the “A” key when the cell is in blue, also known as the “Command mode”.
When you click inside the cell, you will observe that the cell boundary has turned green from the previous colour of blue.
The other way to put across the same information is to say that the cell has changed from “Command Mode” to “Edit Mode”. You can see this in the below image:

We can shift from the edit mode to the command mode by pressing the escape key on the keyboard.
And there we have it. I hope you have found this useful. Thank you for reading.


Until next time!

Comments

Popular posts from this blog

A Beginner’s Guide to Python for Data Science - Part 1 Installing the required software

A Beginner’s Guide to Python for Data Science - Part 5 Adding Comments in Python

A Beginner’s Guide to Python for Data Science - Part 4 Statements and Indentation in Python