Page 16 - PowerPoint Presentation
P. 16

Lesson 4



      Install and use packages










     • Let's now run an example that's a little more interesting. packages are how you

          obtain any number of useful code libraries, typically from PyPI. For this example,


          you use the matplotlib and numpy packages to create a graphical plot as is

          commonly done with data science.



                                                                                                                                   Return to the Explorer

                                                                                                                                   view (the top-most icon on

                                                                                                                                   the left side, which shows

                                                                                                                                   files), create a new file
                                                                                                                                   called standardplot.py,

                                                                                                                                   and paste in the following

                                                                                                                                   source code:











                                                                                                                         PRIVATE & CONFIDENTIAL                                       16
   11   12   13   14   15   16   17   18   19   20   21