A Whirlwind Tour of Python
Jake VanderPlas, Summer 2016
A Whirlwind Tour of Python is a fast-paced introduction to essential components of the Python language for researchers and developers who are already familiar with programming in another language.
The material is particularly aimed at those who wish to use Python for data science and/or scientific programming, and in this capacity serves as an introduction to The Python Data Science Handbook (also with notebooks on github). These materials are adapted from courses and workshops I've given on these topics at University of Washington and at various conferences, meetings, and workshops around the world.
This material was written and tested using Python 3.5, and should work for any Python 3.X version. I have done my best to note places where the syntax of Python 2.X will differ.
(Note: sometimes GitHub's notebook rendering can be slow or finicky. If you're having trouble with the following links, try viewing the material on nbviewer)
- How to Run Python Code
- Basic Python Syntax
- Python Semantics: Variables
- Python Semantics: Operators
- Built-In Scalar Types
- Built-In Data Structures
- Control Flow Statements
- Defining Functions
- Errors and Exceptions
- List Comprehensions
- Generators and Generator Expressions
- Modules and Packages
- Strings and Regular Expressions
- Preview of Data Science Tools
- Resources for Further Learning
- Appendix: Code To Reproduce Figures
License and Citation
If you do use this material, I would appreciate attribution. An attribution usually includes the title, author, publisher, and ISBN. For example:
A Whirlwind Tour of Python by Jake VanderPlas (O’Reilly). Copyright 2016 O’Reilly Media, Inc., 978-1-491-96465-1.