The Jupyter Notebook is an excellent tool for generating and presenting data science projects in an interactive manner. This post will show you how to use Jupyter Notebooks on your own system for data science projects.
A notebook combines graphics, code, integrated with code and its output in a single document. To put it another way, it's a single page where you can run code, see the results, and add explanations, formulas, and charts to make your work more transparent, repeatable, and shared.
Anaconda installation
Installing Anaconda is the simplest approach for a newcomer to get started with Jupyter Notebooks.
Anaconda is the most popular Python data science distribution, and it comes pre-installed with all of the most popular libraries and tools.
To get Anaconda, simply:
Latest version of Anaconda for Python Download.
Install Anaconda by following the instructions on the download page and/or in the executable.
Creating Your First Notebook
We'll learn how to execute and save notebooks, as well as familiarise ourselves with their structure and interface, in this section. We'll learn some basic vocabulary that will help you gain a practical grasp of how to utilise Jupyter Notebooks on your own. This will prepare us for the following segment, which will lead us through an example data analysis and put everything we've learned so far into practice.
How to Open Jupyter notebook
Running Jupyter
In Windows operating system, we can run jupyter notebook just type jupyter notebook in search bar and click on jupyter notebook,
After that open a new tab in your default web browser that should look like the following screenshot below.
We can also open a jupyter notebook using the command prompt, just type “jupyter notebook” and press the enter button.
Create a new project
To create a new jupyter notebook Just click on the ‘New’ button and select python3 as shown in the following screenshot.
After selcting the python3. the new tab automatically opens as shown in the below screenshot.
We can run, write the code in the cell and run the cell. When we run the cell Output Will be shown in it below. To run the cell select the cell and click on Run button as shown below. We can also run the cell using shortcut key shift + Enter and output will be shown as shown in the screenshot below.
If you want to add the new cell in the notebook just click on the plus button. Easiest way to add a cell is just click on outside of the cell (In []) and press the ‘a’ key which is add the cell above the selected cell. OR press the ‘b’ button to add a cell below the selected cell.
File Menu options
New notebook : Create a new jupyter notebook
Open : Open existing notebook
Make a copy : It will create the copy of whole notebook
Save as : It will save the notebook with a different name.
rename : we can change the name of notebook
save and Checkpoint : It will save the notebook and create a new checkpoint, so we can revert to old condition.
print preview : it will show the print preview
download as : we can download the notebook file in many different formats like pdf, html, AsciDoc, LaTex, python .py and many more.
Edit Options
cut cell : It will cut the selected whole cell and we can paste it as we want. below or above the current cell.
copy cell : It will copy the whole selected cell.
paste cell above : it will paste the copied cell above the current cell
paste cell below : it will paste the copies cell below the current cell
delete cell : it will delete the selected or current cell.
undo delete cell : it will revert to the back position.
split cell : It will split your cell. put the cursor on where you want to split the cell.
Merge cell Above : it will merge below cell with the above cell
Merge cell below : it will merge cell with the below cell.
Find and replace : if you want to replace any word with another word we can use the find and replace option.
View Options
Toggle Header : it will hide or show the toggle header
Toggle Toolbar : it will hide or show the toolbar
Toggle Line Numbers : it will hide or show the toggle line numbers
Insert Menu
Insert Cell Above : It will add the cell above the current cell
Insert cell Below : It will add the cell below the current cell
Cell Menu
Run cell : It will run the cell
Run cells and select Below : It will run the cells and will select below cell
Run cells and select Below : It will run the cells and will create a new cell below the run cell.
Run all : It will run all the cells in the notebook.
Run All above : It will run all the cells above of the current select cell.
Run All Below: It will run all the cells Below of the current select cell.
current output > toggle : It will hide the output
current output > toggle scrolling : if your output is very long then it will enable scrolling mode. you can scroll your output.
current outputs > clear : it will clear the output.
Kernel Menu
interrupt : If you want to stop current running cell you can use the this option.
Restart : We can use this option to Restart the notebook
Restart & Clear output : It will Restart your notebook and clear all cells output.
Restart & Run all : it will Restart your notebook and after that will run all the cell.
Reconnect : It will reconnect with kernel
shutdown : it will shutdown the kernel.
Markdown
Markdown is a simple markup language for styling plain text that is lightweight and easy to learn. Because its syntax is identical to that of HTML tags,so some prior knowledge here would be helpful but is definitely not a prerequisite.
Jupyter notebook supported markdown syntax we can see the same result obtained by using markup tags.
# this is level 1 heading (Title )
## this is level 2 heading (Heading)
### this is level 3 heading (subheading)
Normal Text : 'normal text'
It will display like this
if you want to bold text write the text between double star for e.g x**Bold Text**
it will display like this
If you want to add bullet points type '- Markdown'
it will display like this:
If you are looking for any kind of Help in Machine learning assignment Or python assignment Contact us
Comments