Intro to Python® for Computer Science and Data Science: Learning to Program with AI, Big Data and the Cloud

From Our "Intro to" Series

In this exciting, innovative new textbook, you’ll learn hands-on with today’s most compelling, leading-edge computing technologies—and, as you’ll see, with an easily tunable mix of computer science and data science appropriate for introductory courses in those and related disciplines. And, you’ll program in Python—one of the world’s most popular languages and the fastest growing among them.

Instructors: View my 45-minute webinar introducing the textbook, its new pedagogy and its modular architecture, and contact your Pearson representative for your free examination copy

Architecture of the Book

h

Preface

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

h

Table of Contents

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

College Instructors: Get Your Free Evaluation Copy

To get your free examination copy contact your Pearson representative.

If you have a tight time constraint, ask for access to an e-book version at RedShelf.com or VitalSource.com. 

Have other colleagues who need examination copies? Provide your Pearson rep with your colleagues’ contact information. 

Questions? Contact Paul Deitel

Send me an email at paul@deitel.com and I’ll respond promptly.

Prefer to speak face-to-face?Let’s set up a Google Hangouts or Microsoft Teams call with you (and your colleagues) to answer your questions and demonstrate the Jupyter Notebooks supplements.

Available Now: Student Supplements

The following supplements are available now to students (and instructors):

  • Downloadable Python source code (.py files) and Jupyter Notebooks (.ipynb files) for the book’s code examples, for code-based Self-Check Exercises and for end-of-chapter exercises that have code as part of the exercise description.
  • Getting Started videos showing how to use the code examples with IPython and Jupyter Notebooks. We also introduce these tools in Section 1.10.
  • The book’s Companion Website at https://www.pearson.com/deitel contains extensive VideoNotes in which co-author Paul Deitel explains most of the examples in the book’s core Python chapters. New copies of this book come with a Companion Website access code on the book’s inside front cover. If the access code is already visible or there isn’t one (for example, in an e-book), students can purchase access directly from the Companion Website.

Available Now: Instructor Supplements

The following supplements are available now to qualified instructors only through Pearson Education’s IRC (Instructor Resource Center) at http://www.pearsonhighered.com/irc:

  • Interactive Jupyter Notebooks slides containing the book’s source code and text bullets to help drive your presentation. These are fully customizable to meet your needs. The best way to teach Python is by using Jupyter Notebooks—I’ve had tremendous success with this approach in my live Python webinars and my on-site, instructor led training.
  • Instructor Solutions Manual with solutions to many of the exercises. Solutions are not provided for “project” and “research” exercises—many of which are substantial and appropriate for term projects, directed-study projects, capstonecourse projects and thesis topics. Before assigning a particular exercise for homework, instructors should check the IRC to be sure the solution is available.
  • Test Item File with multiple-choice, short-answer questions and answers. These are easy to use in automated assessment tools.

Access to the IRC is strictly limited to college instructors teaching from the book. Instructors may obtain access through their Pearson representatives. If you’re not a registered faculty member, contact your Pearson representative or visit https://www.pearson.com/replocator

What portion of the book should I cover in my course?

The book’s modular architecture helps us meet the diverse needs of computer science, data science and related audiences. You can adapt it conveniently to a wide range of courses offered to undergraduate and graduate students drawn from many majors.

After covering Python Chapters 1–5 and a few key parts of Chapters 6–7, students will be able to handle significant portions of the data science, AI and big data case studies in Chapters 12–17, which are appropriate for all contemporary programming courses:

  • Introductory computer programming courses will likely work through more of Chapters 1–11 and fewer of the Intro to Data Science sections in Chapters 1–10. Some computer-science instructors will want to cover some or all of the case-study Chapters 12–17.
  • Introductory data science courses will likely work through fewer of Chapters 1–11, most or all of the Intro to Data Science sections in Chapters 1–10, and most or all of the case-study Chapters 12–17.

Does your book work well in "flipped" classrooms?

Many instructors now use “flipped” classrooms in which students learn the content on their own before coming to class (typically via video lectures), and class time is used for tasks such as hands-on coding, working in groups and discussions.

Our book and supplements are appropriate for both traditional and “flipped” classrooms:

  • In my extensive VideoNotes, I teach the concepts in the core Python Chapters 1–10.
  • Some students learn best by working hands-on with code. One of the most compelling features of the book is its interactive approach with 538 Python code examples—many with just one or a few snippets—and 557 Self Check exercises with answers. These enable students to learn in small pieces with immediate feedback—perfect for active self-paced learning. Students can easily modify the “hot” code and see the effects of their changes.
  • Our Jupyter Notebooks supplements provide a convenient mechanism for students to work with the code.
  • We provide 471 exercises and projects, which students can work on at home and/or in class. Many of these are appropriate for group projects.
  • We provide lots of probing questions on ethics, privacy, security and more in the exercises and projects. These are appropriate for in-class discussions and group work.

Does your book work well in both undergraduate and graduate courses?

Yes! The book is used in a variety of Computer Science and Data Science intro and upper-level courses as well as course in other disciplines that have a Python component.

Our book also works for shorter courses. I used the book in an aggressive, five-day, lecture-and-hands-on-lab Python and Python Data Science Bootcamp at a big university’s Master of Science in Business Analytics program to get 60 masters students into Python and Python Data Science/AI quickly.

I also regularly teach full-day webinars from the book’s content.

Does your book work well in both undergraduate and graduate courses?

Yes! The book is used in a variety of Computer Science and Data Science intro and upper-level courses as well as course in other disciplines that have a Python component.

Our book also works for shorter courses. I used the book in an aggressive, five-day, lecture-and-hands-on-lab Python and Python Data Science Bootcamp at a big university’s Master of Science in Business Analytics program to get 60 masters students into Python and Python Data Science/AI quickly.

I also regularly teach full-day webinars from the book’s content.

I run an undergraduate/masters program in Business Analytics and we're considering a switch to Python. Will your book help us make this switch?

Yes!

In 2013, Python surpassed R in the job market and, in 2017, Python surpassed R in the data analytics market. For these reasons, many schools are either switching from R to Python or adding Python components to their 10-course curricula as electives.

A big United States university’s Master of Science in Business Analytics program recently brought me in specifically for this reason. Their program’s computing courses currently use R, but the students want to learn Python because that’s what employers want. So I presented an aggressive, five-day, lecture-and-hands-on-lab Python and Python Data Science Bootcamp to help 60 masters students learn Python and Python Data Science/AI quickly. (Interested in having me do this for your program? Check out my Instructor-Led Training options.)

If you’re new to Python, our new learn-a-little, do-a-little pedagogy will help both you and your students learn Python.

If you’re an O’Reilly Online Learning subscriber, check out my Python Fundamentals LiveLessons (50+ hours) in which I patiently present the content from Chapters 1–10 and 12–17. If you prefer a faster presentation, check out my Python Full Throttle and Python Data Science Full Throttle webinars to get fast-paced, code-intensive introductions to the content in Chapters 1–10 and 12–17.

Not an O’Reilly Online Learning subscriber? Sign up for a free trial and view our current Full Throttle webinar schedule. When feasible, I schedule the webinars one week apart so you can use a free trial to register for and attend both. Subscribers also have access to our Python Fundamentals LiveLessons videos.

Textbooks are EXPENSIVE. Are there more economical alternatives available for my students?

Yes!

First, our publisher, Pearson Education, significantly reduced the retail price for the print version of this textbook—it costs less than half of many of our other programming books. For many people, that’s still too expensive.

Pearson now offers lower-cost, six-month e-books rentals and, for those who want it (depending on their locations), lifetime-access e-books via VitalSource.com, RedShelf.com and Chegg.com.

I don't know Python yet. Can you help me learn it?

Yes! You’ll find that our textbook’s new learn-a-little, do-a-little pedagogy will help you learn Python quickly!

If you’re an O’Reilly Online Learning subscriber, check out my Python Fundamentals LiveLessons (50+ hours) in which I patiently present the content from Chapters 1–10 and 12–17. If you prefer a faster presentation, check out my Python Full Throttle and Python Data Science Full Throttle webinars to get fast-paced, code-intensive introductions to the content in Chapters 1–10 and 12–17.

Not an O’Reilly Online Learning subscriber? Sign up for a free trial and view our current Full Throttle webinar schedule. When feasible, I schedule the webinars one week apart so you can use a free trial to register for and attend both. Subscribers also have access to our Python Fundamentals LiveLessons videos.

I am an instructor proposing a course based on your book. Can you help me create a syllabus?

Your content goes here. Edit or remove this text inline or in the module Content settings. You can also style every aspect of this content in the module Design settings and even apply custom CSS to this text in the module Advanced settings.

I’m a professional hearing a lot about AI, data science and Python. Will your book introduce me to these topics?

Yes! And in a fun, interactive manner too.

If you want fast-paced, code-oriented introductions to these topics, consider attending my full day webinars at O’Reilly Online Learning—Python Full Throttle and Python Data Science Full Throttle. These will introduce you to core Python fundamentals and to Python-based data science, AI and AI infrastructure topics.

You can then use my 50+ hour Python Fundamentals LiveLessons videos for deeper, relaxed-pace coverage of each topic.

Not an O’Reilly Online Learning subscriber? Sign up for a free trial and view our current Full Throttle webinar schedule. When feasible, I schedule the webinars one week apart so you can use a free trial to register for and attend both. Subscribers also have access to our Python Fundamentals LiveLessons videos. 

Is this book available to O'Reilly Online Learning subscribers?

Yes! You can view it here.

I have lots of other options for you on O’Reilly Online Learning!

Our sister professional book—Python for Programmers—is a subset of our textbook Intro to Python for Computer Science and Data Science. The professional book does not include:

  • Novice programming pedagogy
  • Self-check exercises and end-of-chapter exercises and projects
  • The textbook’s Chapter 11 on Recurion, Searching Sorting and Big O

O’Reilly Online Learning subscribers also have access to my live, full-day Python Full Throttle and Python Data Science Full Throttle webinars (currently presented once per month each) and to my 50+ hour Python Fundamentals LiveLessons videos.

Not an O’Reilly Online Learning subscriber? Sign up for a free trial and view our current Full Throttle webinar schedule. When feasible, I schedule the webinars one week apart so you can use a free trial to register for and attend both. Subscribers also have access to our Python Fundamentals LiveLessons videos.

Prepublication Reviewer Testimonials

“Strikes a good balance between teaching computer science fundamentals and putting data science techniques into practice. Designed to help students not only learn programming fundamentals but also leverage the large number of existing libraries to start accomplishing tasks with minimal code. Concepts are accompanied by rich Python examples that students 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

“Fun, engaging real-world examples and exercises will encourage students to conduct meaningful data analyses. This book 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

“Great introduction to Python! This book has my strongest recommendation both as an introduction to Python as well as Data Science. A great introduction to IBM Watson and the services it provides!”
—Shyamal Mitra, Senior Lecturer, University of Texas

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

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

“The book’s applied approach should engage students. The examples involving the top-down, stepwise refinement of programs illustrate how programs are really developed. A fantastic job providing background on various machine learning concepts without burdening the users with too many mathematical details.”
—Garrett Dancik, Associate Professor of Computer Science/Bioinformatics, Eastern Connecticut State University

“Wonderful for first-time Python learners from all educational backgrounds and majors. My business analytics students had little to no coding experience when they began the course. In addition to loving the material, it was easy for them to follow along with the example exercises and by the end of the course were able to mine and analyze Twitter data using techniques learned from the book. The chapters are clearly written with detailed explanations of the example code, which makes it easy for students without a computer science background to understand. The modular structure, wide range of contemporary data science topics, and companion Jupyter notebooks make this a fantastic resource for instructors and students of a variety of Data Science, Business Analytics, and Computer Science courses. The “Self Checks” are great for students. Fabulous Big Data chapter—it covers all of the relevant programs and platforms. Great Watson chapter! This is the type of material that I look for as someone who teaches Business Analytics. The chapter provided a great overview of the Watson applications. Also, your translation examples are great for students because they provide an “instant reward”—it’s very satisfying for students to implement a task and receive results so quickly. Machine Learning is a huge topic and this chapter serves as a great introduction. I loved the housing data example—very relevant for business analytics students. The chapter was visually stunning.”
—Alison Sanchez, Assistant Professor in Economics, University of San Diego

“I like the new combination of topics from computer science, data science, and stats. A compelling feature is the integration of content that is typically considered in separate courses. 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

“The end-of-the-chapter problems are a real strength of this book (and of Deitel & Deitel books in general). I would likely use this book. The most compelling feature is that it could, theoretically, be used for both computer science and data science programs.”
—Dr. Mark Pauley, University of Nebraska at Omaha

“I agree with the authors that CS curricula should include data science—the authors do an excellent job of combining programming and data science topics into an introductory text. The material is presented in digestible sections accompanied by engaging interactive examples. This book should appeal to both computer science students interested in high-level Python programming topics and data science applications, and to data science students who have little or no prior programming experience. Nearly all concepts are accompanied by a worked-out example. A comprehensive overview of object-oriented programming in Python—the use of graphics is sure to engage the reader. A great introduction to Big Data concepts, notably Hadoop, Spark, and IoT. The examples are extremely realistic and practical.”
—Garrett Dancik, Eastern Connecticut State University

“I can see students feeling really excited about playing with the animations. Covers some of the most modern Python syntax approaches and introduces community standards for style and documentation. The breadth of each chapter and modular design of this book ensure that instructors can select sections tailored to a variety of programming skill levels and domain knowledge. The sorting visualization program is neat. 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.”
—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! Very clear and engaging coverage of recursion, searching, sorting, and especially Big O—several “Aha” moments. The sorting animation is illustrative, useful, and fun. I look forward to seeing the textbook in use by instructors, students, and aspiring data scientists very soon.”
—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

“IBM Watson is an exciting chapter. I enjoyed running the code and using the Watson service. The code examples put together a lot of Watson services in a really nifty example. 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 are just great.”
—Daniel Chen, Data Scientist, Lander Analytics

“A lucid exposition of the fundamentals of Python and Data Science. Excellent section on problem decomposition. 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. Great exercises.”
—Shyamal Mitra, Senior Lecturer, University of Texas

“My game programming students would appreciate these exercises.”
—Pranshu Gupta, Assistant Professor, DeSales U.

“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 text! The right level for IT students. The examples are definitely a high point to this text. I love the quantity and quality of exercises. Avoiding heavy mathematics fits an IT program well.”
—Dr. Irene Bruno, George Mason University

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

“I was very excited to see this textbook. 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

“The collection of exercises is simply amazing. I’ve learned a lot in this review process, discovering the exciting field of AI. I liked the Deep Learning chapter, which left me amazed with the things that have already been achieved in this field. Many of the projects are really interesting.”
—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 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

“A good overview of various neural networks with coding examples for classification problems for which neural networks are commonly used. The exercises in this chapter will give students insight into how changing the structure of neural networks and the amount of training/testing data affect performance. The Twitter examples covering trending topics, creating word clouds, and mapping the location of users are instructive and engaging. I like the real-world examples of data munging. Reviewing this book was enjoyable and even though I was fairly familiar with Python, I ended up learning a lot.”
—Garrett Dancik, Associate Professor of Computer Science/Bioinformatics, Eastern Connecticut State University

“I really liked the live 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