New Book Review: "A Whirlwind Tour of Python"
New book review for A Whirlwind Tour of Python, by Jake VanderPlas, O'Reilly, 2016, reposted here:
Yes, this book provides a bit of a whirlwind tour of the Python language, not unlike the cycling race depicted on the cover. The author starts by commenting on how the appeal of Python rests on its simplicity and beauty, as well as the convenience of the large ecosystem of domain-specific tools which have been built on top of it, pointing out that most of the Python code in the scientific computing and data science communities has been built around a group of mature and useful packages. However, in order to tap into this ecosystem, Python familiarity is required, and thus the purpose for this book: "I often encounter students and colleagues who have (sometimes extensive) backgrounds in computing in some language – MATLAB, IDL, R, Java, C++, etc. – 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. This report seeks to fill that niche."
Readers should be aware that the author uses the syntax of Python 3, which contains some enhancements which are not compatible with the 2.x series of Python. As discussed extensively in another book, "Picking a Python Version: A Manifesto" (see my review), adoption of Python 3 has been relatively slow, particularly in the scientific and web development communities, even though it was first released in 2008. One of the primary reasons for this slow adoption rate is that it took some time for many of the essential packages and toolkits to be made compatible with the new language internals. But since early-2014, stable releases of the most important tools in the data science ecosystem have been fully compatible with both Python series, and the vast majority of code snippets in this book will also work without modification using Python 2, with efforts by the author to explicitly point out any areas of incompatibility.
After briefly speaking to the ways in which Python can be installed and run, the author quickly moves to a discussion of Python language syntax, and after 5 pages moves on to walking the reader through various language features: basic python semantics (variables, objects, and operators), built-in types and data structures, control flow, defining and using functions, errors and exceptions, iterators, list comprehensions, generators, modules and packages, and string manipulation and regular expressions. And in less than 10-pages, VanderPlas wraps up by providing a preview of data science tools and a list of resources for further learning. Some readers might be disappointed in finding out that the discussions for NumPy (Numerical Python), Pandas (labeled column-oriented data), Matplotlib (MATLAB-style scientific visualization), and SciPy (Scientific Python) roughly only get 1-page a piece.
In his closing pages, the author comments that he has by no means offered a complete introduction to the Python language, and offers a listing of several books to help readers go deeper in understanding the Python language and how to use it. However, I think many readers will find his work satisfactory, especially those who are familiar with other computing languages. While the author provides many code snippets and abundant commentary throughout, those completely new to computing may wish to look elsewhere on the web for some simpler introductory tutorials to get started with the basics of computing in general, and then circle back to this book to complete their introductory journey.