In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly analyzes the relevant knowledge points of how to debug python programs in Jupyter notebook, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about how to debug python programs in Jupyter notebook.
What does python mean Python is a cross-platform, interpretive, compiled, interactive and object-oriented scripting language, originally designed to write automated scripts, and is often used to develop independent and large-scale projects as versions are constantly updated and new features are added.
Jupyter notebook is simple and easy to use and has become a darling in the field of data analysis and machine learning. If bug appears in the process of running the program, it will inevitably need to be debugged. There is a difference between debugging in IDE (integrated development environment) and debugging in Jupyter notebook. Today we will learn how to debug a program in Jupyter notebook.
The debugging of jupyter is realized through the pdb library that comes with python. It is divided into the following steps (click to enlarge the picture):
1) import pdb is required first.
2) then write the statement pdb.set_trace () after import
3) the following shows several functions with a simple code as an example:
Open the home page of jupyter to create a new file and enter the following statement
Import pdbpdb.set_trace () def sum (aformab): c=a+b return ca=1b=2c=sum (ameme b) print (c) Click and drag to move
This is the end of the introduction on "how to debug python programs in Jupyter notebook". More related content can be searched for previous articles, hoping to help you answer questions, please support the website!
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.