Big Data Hadoop Certification Training
- 148k Enrolled Learners
- Live Class
Jupyter Notebooks are a powerful way to write and iterate on your Python code for data analysis. Jupyter Notebook is built off of IPython and the Kernel runs the computations and communicates with the Jupyter Notebook front-end interface. This Jupyter Notebook Cheat Sheet will help you find your way around the well-known Notebook App, a subproject of Project Jupyter.
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. It is used for data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
Let’s begin with the Saving or Loading of Jupyter Notebook
The following are the most used keyboard shortcuts for a Jupyter Notebook running the Python Kernel. This list changes frequently. Check help->keyboard shortcuts in your notebook for the latest shortcuts.
|enter||enter edit mode|
|Command + a; Command + c; Command + v||select all; copy; paste|
|Command + z; Command + y||undo; redo|
|Command + s||save and checkpoint|
|Command + b; Command + a||insert cell below; insert cell above|
|Shift + Enter||run cell, select below|
|Shift + m||merge cells|
|Command + ]; Command + [||indent; dedent|
|Ctrl + Enter||run cell|
|Option + Return||run cell, insert cell below|
|Escape||enter command mode|
|Escape + d + d||delete selected cell|
|Escape + y||change cell to code|
|Escape + m||change cell to markdown|
|Escape + r||change cell to raw|
|Escape + 1||change cell to Heading 1|
|Escape + n||change cell to heading n|
|Escape + b||create cell below|
|Escape + a||Insert cell above|
13. Adjust metadata underlying the current notebook
14. Find and replace in selected cells
15. Remove cell attachments
16. Copy attachments of current cell
17. Paste attachments of current cell
18. Insert image in selected cells
Here are some of the commonly used Magic commands in jupyter Notebook.
|%magic||Comprehensively lists and explains magic functions||%magic|
|%automagic||When active, enables you to call magic functions without the ‘%’||%automagic|
|%quickref||Launch IPython quick reference||%quickref|
|%time||Times a single statement||In : %time method = [a for a in data if b.startswith(‘http’)]|
|%pastebin||Pastebins lines from|
your current session.
|%pastebin 3 18-20 ~1/1-5|
|%debug||Enters the interactive debugger||%debug|
|%hist||Print command input|
and output history
|%pdb||Automatically enter python debugger after any exception||%pdb|
|%cpaste||Opens up a special prompt for manually pasting Python code for execution||%cpaste|
|%reset||Delete all variables and|
names defined in the
|%run||Run a python script|
inside a notebook
|%who, %who_ls, %whos||Display variables defined in the interactive namespace, with|
varying levels of verbosity
|%who, %who_ls, %whos|
|%xdel||Delete a variable in the|
local namespace. Clear any references to that variable
Kernels provide computation and communication with front-end interfaces like the notebooks. Installing Jupyter Notebook will automatically install the IPython kernel.
With this, we come to an end of Jupyter Notebook Cheat Sheet. To get in-depth knowledge, check out our interactive, live-onlineEdureka Python Data Science Certification Training here, that comes with 24*7 support to guide you throughout your learning period.Edureka’s Python course helps you gain expertise in Quantitative Analysis, data mining, and the presentation of data to see beyond the numbers by transforming your career into Data Scientist role. You will use libraries like Pandas, Numpy, Matplotlib, Scikit and master the concepts like Python Machine Learning Algorithms such as Regression, Clustering, Decision Trees, Random Forest, Naïve Bayes and Q-Learning and Time Series.