Python for Programmers

Deitel Developer Series

The professional programmer’s Deitel® guide to Python® with introductory artificial intelligence case studies—Written for programmers with a background in another high-level language, this book uses hands-on instruction to teach today’s most compelling, leading-edge computing technologies and programming in Python—one of the world’s most popular and fastest-growing languages. Please read the Table of Contents diagram inside the front cover and the Preface for more details.

In the context of 500+, real-world examples ranging from individual snippets to 40 large scripts and full implementation case studies, you’ll use the interactive IPython interpreter with code in Jupyter Notebooks to quickly master the latest Python coding idioms.

After covering Python Chapters 1–5 and a few key parts of Chapters 6–7, you’ll be able to handle significant portions of the hands-on introductory AI case studies in Chapters 11–16, which are loaded with cool, powerful, contemporary examples. You’ll also work directly or indirectly with cloud-based services, including Twitter, Google Translate™, IBM Watson®, Microsoft® Azure®, OpenMapQuest, PubNub and more.

Case studies include:

  • natural language processing with TextBlob, NLTK Textatistic and spaCy
  • data mining Twitter® for sentiment analysis
  • cognitive computing with IBM® Watson™—building an interlanguage speech-to-speech translator
  • supervised machine learning with classification and regression
  •  unsupervised machine learning with dimensionality reduction and clustering
  • computer vision through deep learning with a convolutional neural network
  • sentiment analysis through deep learning with a recurrent neural network
  • big data with Hadoop®, Spark™ and NoSQL databases, the Internet of Things and more.
G

Source Code

Preface

View the Preface to learn about the book’s approach and features

Table of Contents

View the full Table of Contents for each chapter’s coverage.

Features

  • 500+ hands-on, real-world, live-code examples from snippets to case studies
  • IPython + code in Jupyter® Notebooks
  • Library-focused: Uses Python Standard Library and data science libraries to accomplish significant tasks with minimal code
  • Rich Python coverage: Control statements, functions, strings, files, JSON serialization, CSV, exceptions
  • Procedural, functional-style and object-oriented programming
  • Collections: Lists, tuples, dictionaries, sets, NumPy arrays, pandas Series & DataFrames
  • Static, dynamic and interactive visualizations
  • Data experiences with real-world datasets and data sources
  • Intro to Data Science sections: AI, basic stats, simulation, animation, random variables, data wrangling, regression
  • AI, big data and cloud data science case studies: NLP, data mining Twitter®, IBM® Watson™, machine learning, deep learning, computer vision, Hadoop®, Spark™, NoSQL, IoT
  • Open-source libraries: NumPy, pandas, Matplotlib, Seaborn, Folium, SciPy, NLTK, TextBlob, spaCy, Textatistic, Tweepy, scikit-learn®, Keras and more.

Comments from Prepublication Reviewers

“Great introduction to Python! This book has my strongest recommendation both as an introduction to Python as well as Data Science.”
—Shyamal Mitra, Senior Lecturer, University of Texas

“IBM Watson is an exciting chapter. The code examples put together a lot of Watson services in a really nifty example.”
—Daniel Chen, Data Scientist, Lander Analytics

“Fun, engaging real-world examples will encourage readers to conduct meaningful data analyses. Provides many of the best explanations of data science concepts I’ve encountered. Introduces the most useful starter machine learning models—does a good job explaining how to choose the best model and what ‘the best’ means. Great overview of all the big data technologies with relevant examples.”
—Jamie Whitacre, Data Science Consultant

“A great introduction to deep learning.”
—Alison Sanchez, University of San Diego

“The best designed Intro to Data Science / Python book I have seen.”
—Roland DePratti, Central Connecticut State University

“I like the new combination of topics from computer science, data science, and stats.”
—Lance Bryant, Shippensburg University

“The book’s applied approach should engage readers. A fantastic job providing background on various machine learning concepts without burdening the users with too many mathematical details.”
—Garrett Dancik, Assoc. Prof. of Computer Science/Bioinformatics, Eastern Connecticut State University

“The chapters are clearly written with detailed explanations of the example code. The modular structure, wide range of contemporary data science topics, and code in companion Jupyter notebooks make this a fantastic resource for readers of a variety of backgrounds. Fabulous Big Data chapter—it covers all of the relevant programs and platforms. Great Watson chapter! The chapter provides a great overview of the Watson applications. Also, your translation examples are great because they provide an ‘instant reward’—it’s very satisfying to implement a task and receive results so quickly. Machine Learning is a huge topic, and the chapter serves as a great introduction. I loved the California housing data example—very relevant for business analytics. The chapter was visually stunning.”
—Alison Sanchez, Assistant Professor in Economics, University of San Diego

“A great introduction to Big Data concepts, notably Hadoop, Spark, and IoT. The examples are extremely realistic and practical. The authors do an excellent job of combining programming and data science topics. The material is presented in digestible sections accompanied by engaging interactive examples. Nearly all concepts are accompanied by a worked-out example. A comprehensive overview of object-oriented programming in Python—the use of card image graphics is sure to engage the reader.” —Garrett Dancik, Eastern Connecticut State University
“Covers some of the most modern Python syntax approaches and introduces community standards for style and documentation. The machine learning chapter does a great job of walking people through the boilerplate code needed for ML in Python. The case studies accomplish this really well. The later examples are so visual. Many of the model evaluation tasks make for really good programming practice. I can see readers feeling really excited about playing with the animations.”
—Elizabeth Wickes, Lecturer, School of Information Sciences, University of Illinois at Urbana-Champaign

“An engaging, highly accessible book that will foster curiosity and motivate beginning data scientists to develop essential foundations in Python programming, statistics, data manipulation, working with APIs, data visualization, machine learning, cloud computing, and more. Great walkthrough of the Twitter APIs —sentiment analysis piece is very useful. I’ve taken several classes that cover natural language processing and this is the first time the tools and concepts have been explained so clearly. I appreciate the discussion of serialization with JSON and pickling and when to use one or the other—with an emphasis on using JSON over pickle—good to know there’s a better, safer way!”
— Jamie Whitacre, Data Science Consultant

“For a while, I have been looking for a book in Data Science using Python that would cover the most relevant technologies. Well, my search is over. A must-have book for any practitioner of this field. The machine learning chapter is a real winner!! The dynamic visualization is fantastic.”
—Ramon Mata-Toledo, Professor, James Madison University

“I like the new combination of topics from computer science, data science, and stats. This is important for building data science programs that are more than just cobbling together math and computer science courses. A book like this may help facilitate expanding our offerings and using Python as a bridge for computer and data science topics. For a data science program that focuses on a single language (mostly), I think Python is probably the way to go.”
—Lance Bryant, Shippensburg University

“You’ll develop applications using industry standard libraries and cloud computing services.”
—Daniel Chen, Data Scientist, Lander Analytics

“Helps readers leverage the large number of existing libraries to accomplish tasks with minimal code. Concepts are accompanied by rich Python examples that readers can adapt to implement their own solutions to data science problems. I like that cloud services are used.”
—David Koop, Assistant Professor, U-Mass Dartmouth

“I enjoyed the OOP chapter—doctest unit testing is nice because you can have the test in the actual docstring so things are traveling together. The line-by-line explanations of the static and dynamic visualizations of the die rolling example are just great.”
—Daniel Chen, Data Scientist, Lander Analytics

“A lucid exposition of the fundamentals of Python and Data Science. Thanks for pointing out seeding the random number generator for reproducibility. I like the use of dictionary and set comprehensions for succinct programming. ‘List vs. Array Performance: Introducing %timeit’ is convincing on why one should use ndarrays. Good defensive programming. Great section on Pandas Series and DataFrames—one of the clearest expositions that I have seen. The section on data wrangling is excellent. Natural Language Processing is an excellent chapter! I learned a tremendous amount going through it.”
—Shyamal Mitra, Senior Lecturer, University of Texas

“I like the discussion of exceptions and tracebacks. I really liked the Data Mining Twitter chapter; it focused on a real data source and brought in a lot of techniques for analysis (e.g., visualization, NLP). I like that the Python modules helped hide some of the complexity. Word clouds look cool.”
—David Koop, Assistant Professor, U-Mass Dartmouth

“I love the book! The examples are definitely a high point.”
—Dr. Irene Bruno, George Mason University

“I was very excited to see this book. I like its focus on data science and a general purpose language for writing useful data science programs. The data science portion distinguishes this book from most other introductory Python books.”
—Dr. Harvey Siy, University of Nebraska at Omaha

“I’ve learned a lot in this review process, discovering the exciting field of AI. I’ve liked the Deep Learning chapter, which has left me amazed with the things that have already been achieved in this field.”
—José Antonio González Seco, Consultant

“An impressive hands-on approach to programming meant for exploration and experimentation.”
—Elizabeth Wickes, Lecturer, School of Information Sciences, University of Illinois at Urbana-Champaign

“I was impressed at how easy it was to get started with NLP using Python. A meaningful overview of deep learning concepts, using Keras. I like the streaming example.”
—David Koop, Assistant Professor, U-Mass Dartmouth

“Really like the use of f-strings, instead of the older string-formatting methods. Seeing how easy TextBlob is compared to base NLTK was great. I never made word clouds with shapes before, but I can see this being a motivating example for people getting started with NLP. I’m enjoying the case-study chapters in the latter parts of the book. They are really practical. I really enjoyed working through all the Big Data examples, especially the IoT ones.”
—Daniel Chen, Data Scientist, Lander Analytics

“I really liked the live IPython input-output. The thing that I like most about this product is that it is a Deitel & Deitel book (I’m a big fan) that covers Python.”
—Dr. Mark Pauley, University of Nebraska at Omaha

Pin It on Pinterest

Share This Page