Jupyter Notebook Basics (Learn What you need)
What is ‘Jupyter Notebook’?
- Jupyter Notebook is an interactive tool for data analysis and Python programming. It allows asking questions to data and visualizing it. Also It provides an interactive and immediate response Python interpreter and supports working with documents and interactive workflows.
There two types of text in jupyter notebook, it can be either python code or markdown.
MarkDown on Jupyter Notebook
- Markdown is a text formatting tool used to render text with HTML output. Markdown can be used to format documents, create pretty reports, and generate PDFs or HTML pages.
Markdown formatting
Use
#
for heading -#
Header 1,##
Header 2,###
Header 3Use
>
for blockquotes**
or__
for bold text_
or*
for italic text[]
and()
for creating link!
for image-
or+
unordered listsnumbers of Ordered list
$
for inline equations|
to create tables.`code`
to format inline code & triple backticks for multi-line codeAdd two spaces at the end of a line, or add an empty line to create a line break
examples-
# Header 1 ## Header 2 ### Header 3 > **This is blockquotes** **Bold Text** _Italic Text_ - **Unordered List:** - Item 1 - Item 2 - Sub-item 1. **Ordered List:** 1. First item 2. Second item [Blog Post](https://sutto.hashnode.dev/sql-for-data-analysis) ![Image](https://i.pinimg.com/736x/bd/ca/77/bdca77ce685683051151996ffbaa4f7f.jpg) | Column 1 | Column 2 | |----------|----------| | Data 1 | Data 2 | **Inline Code**: Use `print("Hello, World!")` to print a message. **Code Block**: ```python def greet(): print("Hello, World!") greet()
Output-
You can switch between code and markdown by the drop down option in Jupyter Notebook.
Some Shortcuts in Jupyter Notebook
A: Insert cell above
B: Insert cell below
D + D: Delete selected cell
Z: Undo cell deletion
M: Convert cell to Markdown
Y: Convert cell to Code
C: Copy cell
V: Paste cell below
Shift + M: Merge with the cell below
Ctrl + Enter: Run the cell
Shift + Enter: Run cell and move to the next
Ctrl + S: Save Notebook
Switching between edit and command mode in Jupyter Notebook
Escape key for switching from edit to command mode.
Enter key to switch to Edit Mode.
M for markdown & Y for Python code
use the up and down key for moving around the cells
Subscribe to my newsletter
Read articles from Sutapa Biswas directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by