Introduction to Spyder IDE 1

Introduction to Spyder IDE 1

Introduction to Spyder IDE 1 About Spyder What is Spyder? What is Spyder IDE? Spyder is an open source cross-platform integrated development environment (IDE) for scientific programming in the Python language. 3 2 First Steps Installation and opening Download: https://www.anaconda.com/distribution/ 5 Opening via Anaconda Navigator 6 Opening via Command Line 7 Spyder IDE 8 3 Files Exploring files and folders File Explorer Explore Set as workspace Use file explorer to explore files and Double click the folder to set the folders in your system. folder as the workspace. Running scripts will be done in the selected directory. 10 Files explorer 11 4 Code Execution Code execution methods and the variable explorer Code Execution Run file Run specific line IPython console Run specific cell Press F5 to run Highlight the Interactive mode of Using #%% to every part of the specific part of the Python can be separate cells, an code, or the whole code, then press used in IPython individual cell can file. F9 to execute it. console, available be run with “Run Results will remain. in the bottom right current cell” button. of the Spyder IDE. 13 Variable Explorer What is it? Details Location Variable explorer is a Each variable in the Variable explorer is feature which allows you variable explorer will located in the top right of to view all variables contains name, type, size, the Spyder IDE. available or created from and value. executing the code. 14 Run the highlighted part of code 15 Executed variable declaration appears in the variable explorer 16 Custom code execution in IPython console 17 Executed code in IPython console altered the value of variable 18 Run the specific cell of code 19 5 Reset Start over by resetting all variables Resetting Methods Reset with button Reset with command Press the eraser button above the Type %reset into the IPython variable explorer to reset all console to reset all variables. This variables. requires confirmation via the IPython console. 21 Reset variables button 22 Variables removed 23 Reset variables command 24 Variables deleted 25 6 Documentation Inspect a documentation of a certain function, class, or method Documentation inspection 27 7 Debugging Use debug feature, along with the variable explorer Debugging Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct operation of computer software or a system. Debugging tactics can involve the following: ● Interactive bugging ● Control flow analysis ● Unit testing ● etc. 29 Debugging in Spyder Start Debugging Execute current line Stop Debugging Code Fix Press Ctrl + F5 to start debugging. Execute code line by line until Press Ctrl + Shift + F12 to stop Edit the part of the code where you noticed the bug, mistake, or debugging. the bug, mistake, or flaw is flaw. found. 30 Start debugging 31 Execute the current line of code 32 After line 15 execution, bug found 33 Stop debugging mode, bug fix 34 Re-execute the whole file, meet desired result 35 8 Plots View plotted charts plotted by matplotlib Sample matplotlib code execution 37 Plots viewing 38 9 Advanced Usage Preview of Spyder advanced usage Advanced Usage Since Spyder is an IDE for scientific programming, data-related programming and engineering is Data-related programming: ● Data analysis ● Data visualization ● Machine learning ● etc. 40 Dataset import 41 Dataset inspection 42 Dataset sorting 43 Dataset value formatting (viewing-only) 44 Value formatting 45 Prediction and plotting 46 Thanks! Any questions? 60070009, 60070021, 60070036, 60070037, 60070063, 60070072, 60070075, 60070083, 60070119, 60070183 47.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    47 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us