In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, I would like to talk to you about how to conduct Jupyter Notebook analysis, many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.
Jupyter Notebook is a powerful tool for editing code, run results, and documentation in the form of web pages. With it, you can write code, run code, and render the results directly in the web page. It is a necessary tool in the fields of data analysis and machine learning.
Gossip, the word Jupyter is not Jupiter's English word Jupiter, but a mixture of Julia, Python and R names. So you can use it to handle a lot of languages.
In addition, there is a brother JupyterLab, but compared to its Jupyter Notebook has an advantage is that you can use keyboard shortcuts. Because sometimes using the mouse feels too troublesome and inefficient, and skillful use of keyboard shortcuts will make you faster and easier than others.
Let's take a look at these shortcuts. The first thing to know is that Jupyter Notebook has two keyboard input modes.
Edit mode, you can enter code or text in the cell, where the border of the cell is green. In command mode, the keyboard enters the command to run the program, and the border of the cell is gray and blue on the left.
The first shortcut is Esc to enter command mode, and then press h, and the pop-up help panel lists common shortcut operations, as shown at the end of the article.
1 command mode
Press the button Esc to turn on
Enter: enter edit mode Shift-Enter: run this unit, and select the next unit Ctrl-Enter: run this unit Alt-Enter: run this unit And insert a new unit below Y: unit cut code state M: unit cut into markdown state R: unit turns into raw state 1: set level 1 title 2: set level 2 title 3: set level 3 title 4: set level 5 title 6: set level 6 title 6: select upper unit K: select upper unit Down: select lower order Meta J: select the lower unit Shift-K: enlarge the upper unit Shift-J: enlarge the lower unit A: insert the new unit B above: insert the new unit below X: cut the selected unit C: copy the selected unit Shift-V: paste to the upper unit V: paste to the lower unit Z: restore the last deleted unit D D: delete selected unit Shift-M: merge selected unit Ctrl-S: file save S: file save L: conversion line number O: conversion output Shift-O: conversion output scroll Esc: close page Q: close page H: display shortcut I: interrupt Notebook kernel 0: restart Notebook kernel Shift: ignore Shift-Space: scroll up Space: scroll down 2 edit mode
Enter key to open
Tab: code completion or indentation Shift-Tab: prompt Ctrl-]: indent Ctrl- [: unindent Ctrl-A: select all Ctrl-Z: restore Ctrl-Shift-Z: do Ctrl-Y again Ctrl-Home: skip to the beginning of the unit Ctrl-Up: skip to the beginning of the unit Ctrl-End: skip to the end of the unit Ctrl-Left: skip to the end of the unit Ctrl-Left: skip to the beginning of the unit Ctrl-Right: skip to the right prefix Ctrl-Backspace: delete the previous word Ctrl-Delete: delete the last word Esc: enter command mode Ctrl-M: enter command mode Shift-Enter: run this unit Select the next unit Ctrl-Enter: run this unit Alt-Enter: run this unit, insert a unit below Ctrl-Shift--: split unit Ctrl-Shift-Subtract: split unit Ctrl-S: file save Shift: ignore Up: move the cursor up or move to the previous unit Down: move the cursor down or go to the next unit 3 magic command
When we use% matplotlib inline so that the Matplotlib chart can be rendered directly in the notebook. This order is the so-called magic command. We can also use some other magic commands.
Line magic commands run Cell magic commands on a single line of code units throughout the code unit
Some commonly used magic commands are shown in the following table
For more magic commands, open Jupyter Notebook, type% lsmagic in the cell, and then run the cell. This will output a list of available line and unit magic commands, and will also tell you if automagic is open.
% lsmagic
% automagic
Automagic is ON,% prefix IS NOT needed for line magics.
At this point, it means that automagic is on, and the magic command does not require a% prefix.
4 help panel
After reading the above, do you have any further understanding of how to conduct Jupyter Notebook analysis? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.