In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you what are several hidden features of jupyterNotebook to enhance the user experience, which are concise and easy to understand, which will definitely brighten your eyes. I hope you can gain something through the detailed introduction of this article.
Jupyter Notebook is an interactive, easy-to-create programming environment that supports real-time programming and sharing documents. The following will take you to learn a few Jupyter Notebook extensions to make it easier for you to use this valuable tool.
First, we enter the following command at the command prompt:
Pip install jupyter_contrib_nbextensions & & jupyter contrib nbextension install
Then start Jupyter Notebook and navigate to the new Nbextensions extension tab, as shown in the following figure:
Next, launch the extensions tab (if you don't see the tab, open Notebook and click Edit > nbextensionsconfig), and the enabled extensions can be seen in the toolbar in Notebook, as shown in the following figure:
So what is an extension of Notebook? Jupyter Notebook extensions are simple add-ons that extend the basic functionality of the Notebook environment. They are written in JavaScript and can automatically format the code or send browser notifications when the cell is complete. Currently, extensions can only work in Jupyter Notebook, not in Jupyter Lab.
Why use these Jupyter Notebook extensions? Jupyter Notebook is a good tool for teaching, learning, prototyping, exploring and trying new methods. However, the features of ordinary Notebook are limited, which may make their work unable to meet the further needs of many people. While Jupyter Notebook extensions don't completely solve the problem, they do add some benefits and make our job easier.
Here are the five most commonly used extensions to Jupyter Notebook:
1. Table of Contents:
If we need to find dozens of units in Jupyter Notebook, it's hard to keep track of them completely. Table of Contents solves this problem well by adding links that can be located anywhere on the page:
In addition, we can use the extension to add a linked table of contents at the top of the Notebook. This makes it easy to display which unit is selected and which unit is running, as shown in the following figure:
2. Autopep8:
In fact, each of us should write pep8-compatible code, but sometimes we get confused and it's hard to find the best practice. When we encounter this situation, this extension of Autopep8 allows us to automatically format messy code by clicking the "mallet" button above, as shown in the following figure:
Like the best add-ons, this Autopep8 component accomplishes a time-consuming and tedious task with a simple click, allowing us to focus on the main problem.
3. Variableinspector:
The Variableinspector (variable Checker) displays the names of all the variables we created in Notebook, as well as their types, sizes, shapes, and values. As shown in the following figure:
This tool is invaluable for projects migrated from RStudio. Or Variableinspector will be very useful when we don't want to continue printing df.shape and can't remember the type of x.
4. ExecuteTime:
We sometimes want to figure out how long it takes for a unit to run, or when we last ran a Notebook, and ExecuteTime solves these two problems by showing when the cell is complete and how long it will take.
In addition, there are other timing methods, such as% timeit cellmagic, which is easy to use, but covers all the original units in the Notebook. So I still recommend that you use the ExecuteTime extension.
5. Hide Code input:
Although some of us like to do the work of analysis, others like to see the results directly. The Hide Code input extension allows us to hide all the code in Notebook immediately while keeping the output, meeting different needs.
These are the five most commonly used Jupyter Notebook extensions I've summarized for you. You can find more useful extensions by installing the extensions and opening Notebook to view the entire list of extensions, and we can even write our own extensions.
What are the hidden functions of jupyterNotebook to enhance the user experience? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.