2. Learning Outcomes
Describe the capabilities of the Python programming
language
Understand the numerous channels for learning Python
2
3. What is Python?
Programming Language which is:
Free
Cross-platform
General purpose
First released in 1991
Named after British comedy group
‘Monty Python’s Flying Circus’
3
4. Great Things About Python
4
Compatible
Object-oriented (or not)
>>>__
Simple$ Free
14. Resources for Learning Python
Free tutorials
learnpython.org (browser-based)
Fee-based online courses
Python For Everybody[coursera.com]
Books
User Groups
Conferences
14
Podcasts
Talk Python to Me
Online tutors
www.pythontutor.com
Video courses
Learn Python 3 The Hard Way
Newsletters
Real Python
15. Summary
Python is an easy-to-read language that is relatively easy to learn
Vast number of tested libraries/packages already written you can use
Free and open source
No matter what your favorite learning mode, there are resources for learning
Python!
15
20. Online courses
Python For Everybody[coursera.com]
The Data Science Toolbox[coursera.com]
Learning Python with PyCharm[lynda.com]
Introduction to Python: Absolute Beginner[edx.com]
Introduction to Computer Science and Programming Using Python[edx.com]
AI Programming with Python[udacity.com]
Introduction to Computing in Python[edx.com]
Python I: Essentials[quickstart.com]
20
22. Conferences
PyCon: Annual, venue varies
2 days of tutorials ahead of conference
SciPy: Annually in July in Austin, TX
Several days of tutorials ahead of conference
PyData: Educational program of NumFocus
PyData NYC: Nov. 4-6, 2019
PyData Los Angeles: Dec. 3-5, 2019
PyData Austin: Dec. 7-8, 2019
OSCON (O’Reilly Open Source Convention)
Videos from conferences: https://pyvideo.org/
22
23. More Conferences
PyCarolinas (North and South Carolina, United States)
PyOhio (Ohio, United States)
PyTexas (Texas, United States)
PyGotham (New York, United States)
PyBay (California, United States)
PyCascades (Seattle, WA)
Women Who Code Python Summit
23
27. Video Courses
Talk Python Training
Learn Python 3 The Hard Way
Learn More Python 3 the Hard Way: The Next Step for New Python
Programmers
YouTube:
PyDataTV
Cory Schafer
Data School
27
I’m Linda Ruetz-I’m a biomedical engineer at Abbott working on medical device research. I’ve been on a journey to learn Python for the last 6 years to use for data analysis and task automation. I would like to explain why you should learn it as well.
What I would like for you to be able to do by the end of this talk is to …
First of all, Python has nothing to do with snakes!
Cross platform: Can develop code on one platform and run it on another.
Here are some of the great things about Python.
Free: never have to pay for extra toolkits to get that one more function that you need. Along with being free, it is open-source, meaning that you can go look at the code inside the packages to see how they are implementing something
Compatible: Very useful as glue to piece together code from other packages
Simple: Can write things with few lines of code, not a lot of punctuation
Object-oriented: If you’re used to structuring your code that way, you can code that way in Python
The best thing about Python is the massive number of packages already written! Many are very well developed and tested. Here’s a sampling of categories of packages available in the Python Package Index. And there are many other repositories of Python packages such as GitHub.
I’ll describe some of the most popular libraries in Python.
Numpy: fundamental package for scientific computing-does array processing
SciPy: Ecosystem for math, science, and engineering
Matplotlib is the main plotting package for Python
Jupyter is a web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text
SymPy is full featured library for symbolic mathematics
Veusz is a scientific plotting and graphing program with a graphical user interface, designed to produce publication-ready plots
Pandas is a library for data manipulation and analysis. In particular, it offers data structures and operations for manipulating numerical tables and time series
Scikit learn is a machine learning package
Scikit image is an image processing package
Seaborn builds on matplotlib to let you do really interesting statistical visualizations
Bokeh provides an easy way to do interactive visualizations
The Python developer community is one of the more friendly, helpful communities. There is a code of conduct guiding interactions between members of the community to keep things positive. The Python Software Foundation and NumFocus are non-profits which sponsor Open Source development and conferences and educational programs.
Although Python has been around since 1991, it has greatly gained in popularity in the last 10 years due to all the fantastic libraries and is now more traffic to Python questions on the Stack Overflow website than any other language.
Although Python has been around since 1991, it has greatly gained in popularity in the last 10 years due to all the fantastic libraries, and there is now more web traffic to Python questions on Stack Overflow than any other language.
Now that you’re convinced to try Python, how do you get it? There is usually a Python installation on pretty much any computer you may buy, but it may not be the latest version, and you will likely want more packages. You can get them from the mother ship, Python.org, or from a distribution that will provide versions of packages that are compatible with each other. Anaconda is a distribution for scientific computing that aims to simplify package management and deployment.
Enthought Canopy is a graphical package manager of pre-built and tested scientific and analytic Python packages
Homebrew is a free and open-source software package management system that simplifies the installation of software on macOS and Linux
Once you have your packages installed, how do you work in it?
Jupyter is a web application for development- multi language with R and Julia
Spyder, or Scientific Python Development Environment, is a free integrated development environment (IDE) that is included with Anaconda. It is similar to Matlab.
Colaboratory is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud
PyCharm is an IDE developed by JetBrains
Visual Studio Code is a heavyweight text editor that you can run Python in
Or you canan also just use your current favorite text editor and a terminal window, if that’s your style!
Next I’ll show a simple data analysis example in Python.
It is implemented in a Jupyter notebook, which allows you to mix code blocks with text annotations, formulas, and plots.
This first cell of code contains commands for loading the Pandas, Matplotlib, and SciPy statistics libraries.
The second code cell reads in tabular data from an Excel spreadsheet using Pandas. If the tabular data has column labels, those serve as the keys to the columns. This example has data about the hills in Scotland.
Here I’m doing a linear regression in one line of code and getting out the slope and intercept of the line. This is a simple example, but you could do much more complex statistics just as simply using the SciPy library
In about 5 lines of code, I can create a scatter plot with the regression line and can save it to a file to use in a presentation or report, or just use the Jupyter notebook for the presentation, showing how the data was manipulated and what the results are.
Everyone has a favorite way to learn, so I will mention many pathways with one example of each.
Of course you can always enroll in a college course, and Python is frequently taught in beginning programming courses now, but there are less expensive options.
I hope after hearing about all that Python has to offer that you have been convinced to become a Pythonista and find the fun in programming, as shown in this xkcd comic.
I have compiled lists of additional resources. If you e-mail me, I will send you a copy of my slides with these resources.
Are there any questions?