4. Jupyter Notebook tips & Tricks – Python for Data Science Machine learning deep learning




[ad_1]

Python for Data Science – Machine Learning.
#DataScience #LearnForFree #Python #MachineLearning #ArtificialIntelligence #DeepLearning #ManifoldAILearning

Source Code : https://courses.manifoldailearning.in/p/python-for-data-science-machine-learning-deep-learning/

From the last few videos we have been using Jupyter Notebook for our programming in Python.
In this video,
Let me show you some of tips while using this Jupyter notebook for Programming.

1st and foremost is, knowing how to change the file name and, how to save.
As you can observe,
We have been programming in this screen and it has the name as – Untitled as Above

To change the name, just click on the Untitled,
You will get a popup requesting for new Notebook name.
Here, you can rename your notebook as per your requirement.

I will rename as – My First Program, and press the enter key

Next is,
To save the Jupyter notebook, Click on save button here.

If you click on File on the tool bar,
You can see the list of options,
Here, you can create a new notebook, You can create another copy of your existing notebook, and Download as – Different formats and so on.
All these are self explanatory, and You should be able to use it as per your requirement.

Okay,
I will now click on a program line here.

All these individual space where we are writing our programs are called cells.
and, when I am writing inside cell, you can see a little green box around it.
Can you observe it ?
Yes these Green box says that, We are inside the cell in Edit Mode.

Now, I will press the ESCAPE button on keyboard.

The Green box has been changed to Blue Box. This is known as Command Mode.
This means, whatever the key we enter on our keyboard, it will be bound to notebook level action.

To enter back to Edit mode, press the enter key.

So, there are two modes,
Edit mode and Command mode

Now, Lets see some keyboard shortcuts in command mode.
I will press on escape button to enter command mode from edit mode
We already know that,
To execute the code,
We were using the command of – Shift+Enter
What this was doing is,
The system was executing the current cell and moving to next cell.

There is one more shortcut,
That is, CTRL + Enter
What this will do is,
The system will run the current cell, but the focus would stay in same cell like this.

There is one more Shortcut,
That is, Alt + Enter
If I execute this,
The system will run the cell and create a new cell below it. Like this

I am now in Edit mode, I will go back to Command mode by pressing escape button.

Now, being in command mode,
By pressing A in keyboard, A new cell is inserted above the current cell,
And by pressing B in Keyboard, a new cell is inserted below.

And, we can copy the cell with pressing C, and we can paste it by pressing V

Now,
Whenever you are writing a code in a cell, make sure it is selected as – Code on top of screen

If you want to Create a Markdown like this,
You can make a cell as Markdown cell, by selecting the cell and selecting the Markdown on Top .
And,
To mark any particular line as Comment, We can make use of shortcut – CTRL with forward slash like this.

And, finally we use of Tab button to see the completions available for that particular function or variable.

You can refer the description of the video for all the shortcuts shown in the video.

Source


[ad_2]

Write a comment