Book Review – Python for Programmers, by Paul Deitel and Harvey Deitel
Python for Programmers: a brief overview.
Join the DZone community and get the full member experience.
Join For FreePython for Programmers is written for those who already have some object-oriented programming background and are interested in Python, Artificial Intelligence, and Data Science.
Like Two Books in One
Introduction to Python With a Data Science Flavor
The first half of the book provides a quick introduction to the Python that will be easy to follow for experienced programmers. In addition to basic programming concepts, the first half of the book also introduces topics integral to data science. Among these topics are dynamic data visualization with MatPlotlib and Seaborn, high-performance array operations using NumPy and Pandas' DataFrame, and data munging or data wrangling.
In the first half of the book, each chapter presents a selection of Python features, such as data types, control statements, and exception handling. At the same time, each of those chapters includes a brief mention of data science. For instance, in chapter two the authors invite you to learn or recall some basic descriptive statistics (minimum, maximum, range), showing how easy it is to calculate them in Python. Then, in chapter three, they take you a little further and let you add mean, median, and mode to your toolset. In chapter nine, you are invited to calculate statistics and generate a simple histogram of passenger ages, using Pandas and the Titanic Disaster Dataset.
It's worth mentioning that, while this approach of mixing the teaching of a programming language with Data Science concepts may seem a bit confusing at first, it rapidly starts to make sense, as the internal chapter structure becomes apparent: an introduction, then some Python that coherently builds on the topics from the previous chapters, then something on data wrangling or statistics, then a wrap-up section that helps you recap what you have just read. Once you grasp that structure, it becomes easier to navigate through this part of the book.
Chapter 10 follows the same structure but becomes slightly more complicated. It presents object-oriented programming in Python in addition to a more advanced data science concept, simple linear regression.
Introduction to Data Science and Artificial Intelligence With a Python Flavor
Beginning in chapter 11, you’ll find that the authors are focusing more on data science and less on programming. The reader is now expected to be familiar with the language syntax and some commonly used data structures, so the second half of the book serves to present some more specialized topics related to A.I. and Big Data. Chapter 11 presents Natural Language Processing (NLP) and includes exercises on web scraping. Then, there is chapter on Data Mining, where you'll be invited to use the Twitter API with Tweepy to obtain JSON tweet data and use it to perform sentiment analysis, geocoding (with GeoPy), and mapping (using Folium).
In chapter 13, you will get your first experience with IBM Watson and cognitive computing. IBM Watson became kind of a celebrity in 2011 when it competed in Jeopardy! against the show's two all-time best players. (Oh, and Watson won, of course). Nowadays, it's one of the most powerful cognitive computing services platforms available. Understanding Watson's interworkings sounds hard, but, in fact, it is all presented in a gradual progression, leaving much of the inherent complexity to a later (and deeper) dive into IBM’s documentation.
IBM offers many different cloud computing services that could never fit in a single chapter or even a single book, so the authors have decided to show a few examples, recommending the reader to create a user account on IBM’s Bluemix (which meanwhile has been rebranded as IBM Cloud) and to explore their API documentation and tutorials. If you go through the case studies, you will use IBM Watson's cognitive computing services to build an application that does natural language translation, including speech-to-text and text-to-speech conversion.
In chapter 14, we get introduced to the basics of machine learning, including the concepts of
classification with K-Nearest Neighbors (as a case study, you will be using the Digits Dataset
bundled with Scikit-learn to recognize handwritten digits, like those written in mail envelopes), simple linear regression, multiple linear regression (including an interesting case study where Scikit-learn is used to make sophisticated house pricing predictions from 8 numerical features), and K-Means Clustering (another interesting case study, using the Iris Dataset, where flowers are grouped into their species according to a prediction based on some of their features, like petal and sepal lengths and widths).
Chapter 15 goes even deeper, focusing on Deep Learning, convolutional and recurrent neural
networks with a computer vision case study. This time, the reader is invited to use the MNIST
database of handwritten digits, applying convolutional neural networks (using
Keras/Tensorflow) to achieve a higher digit prediction accuracy. First, you'll get a brief explanation of neural networks and tensors. Then, you will be able to get your hands in a recurrent neural network task to implement a better sentiment analysis on IMDb movie reviews.
Finally, in chapter 16, you get to know Apache Hadoop, Apache Spark, SQL (SQLite), NoSQL
(MongoDB), and a brief introduction to the IoT (Internet of things). As with the rest of the book, you'll also learn how to create interesting data visualizations.
Conclusions
Data science is a complex field, but this book makes topics approachable for intermediate level programmers. The authors managed to create a learning curve of growing complexity, so readers feel confident through the first 10 chapters if they have some experience with object-oriented programming. On the other hand, in case you are already a Python programmer, going through those initial chapters won't hurt and may very well serve you to recall the basics of Python, data analysis, and data visualization. Readers may also choose to take a shortcut by reading each chapter's list of objectives and its "Wrap-Up" section, to check how comfortable they feel about the topics covered.
Although the second half of the book will not make anyone a certified data scientist or A.I. engineer, it should provide the reader with a solid understanding of what A.I., machine learning, and deep learning are. Additional learning resources are also provided for further study of topics of interest for readers.
Disclosure Notice: For this review, I received a free copy of the book from the publisher. I do not personally know the authors or the publishers, and I did not receive any other compensation. I am not endorsing the company or making any profit from this review.
Published at DZone with permission of Victor Domingos. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments