Summary & Discussion
In the preface to his Handbook he states that Whirlwind’s purpose is to “provide a tour of the essential features of the Python language, aimed at data scientists who already are familiar with one or more other programming languages.”
On Whirlwind page 2, he states that the book is for readers who already have “backgrounds in some other language…and are looking for a brief but comprehensive tour of the Python language that respects their level of knowledge rather than starting from ground zero.”
On that basis, I expect this book will have somewhat less depth and fewer examples than Zed Shaw’s Learn Python the Hard Way, another reference I have used, which is just as well for my purposes.
I will be relying on this book in order to learn the essential elements of the Python language. The book is a free download from O’Reilly Media. I expect I will be reproducing and commenting on large parts of it in my notes.
As part of my ongoing attempt to understand the knowledge base a Data Scientist requires, I’ve distilled the notable parts of the book’s contents, below.
How to Run Python
- Python interpreter, IPython interpreter, Python Scripts
Variable and Object Semantics
- Variables are Pointers, Everything is an Object
- Identity and Membership Operators
- None Type
Built-In Data Structures
- list, tuple, dict, set
- break, continue
- *args and **kwargs: Flexible Arguments
- Anonymous (lambda) Functions
Errors and Exceptions
- Catching Exceptions: try, except, else, finally
- Raising Exceptions: raise
- Accessing the error message
- Defining custom exceptions
- Iterating over lists, range()
- enumerate, zip, map and filter
- iterators as function arguments
- Basic, multiple
- Conditional on iterator, conditional on value
- Generators versus Iterators
String Manipulation and Regular Expressions
- Formatting and Splitting strings
- Regular Expressions: flexible pattern matching
Content for this article is taken from:
A Whirlwind Tour of Python by Jake VanderPlas (O’Reilly). Copyright 2016 O-Reilly Media, Inc., 978-1-491-96465-1. Get it (free!) here.