Python Fundamentals: with GenAI, 2/e
Deitel Developer Series: Video Course
NEW EDITION UNDER DEVELOPMENT: Watch the Sneak Peek videos at https://learning.oreilly.com/course/python-fundamentals-with/9780135917411/
The professional programmer’s Deitel® guide to Python® with introductory data science, AI and genAI case studies—For programmers with a background in another high-level language, this course 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
In the context of 500+, real-world examples ranging from individual snippets to 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 Lessons 1–5 and a few key parts of Lessons 6–7, you’ll be able to handle significant portions of the hands-on introductory Data Science and AI case studies in Lessons 11 and highter, which are loaded with cool, powerful, contemporary examples.
Second Edition Update Status
We will post each new lesson as it’s completed, not necessarily in lesson-number order.
Planned New Lessons
- Python API-Based Generative AI Programming
- Agentic AI
- Artificial General Intelligence/Superintelligence
- Graphical User Interfaces
- Graphics
- Multimedia
- Concurrency
Completed New Lessons
- Sneak Peek overview video
- Before You Begin—Setting up your Python environment
- Lesson 1—Test-Drives: Using IPython and Jupyter Notebooks
- Lesson 2—Intro to Python Programming—Variables, types, operators, strings, I/O, decisions, intro to objects and dynamic typing.
Lessons Being Enhanced: These will be updated in place once available
- Lesson 3—Control Statements—if, if…else, if…elif…else, for, while, break, continue, augmented assignments, boolean operators, intro to lists.
- Lesson 4—Functions—Custom function definitions, importing libraries, simulation with random-number generation, scope, default parameter values, keyword arguments, arbitrary argument lists, methods, intro to tuples, intro to functional-style programming.
- Lesson 5—Sequences: Lists and Tuples—Create, initialize and access the elements of lists and tuples; sort and search lists, search tuples; pass lists and tuples to functions and methods; methods of the list collection; functional-style programming (lambdas, filter, map, reduce, list comprehensions, generator expressions); 2D lists; static visualization with the Seaborn and Matplotlib visualization libraries.
- Lesson 6—Dictionaries and Sets—Dictionaries of key–value pairs; sets of unique values; iterating through keys, values and key–value pairs; adding, removing and updating key–value pairs; dictionary and set comparison operators; set operators and methods; operators in and not in for membership testing; mutable set operations; dictionary and set comprehensions; dynamic visualization with the Seaborn and Matplotlib visualization libraries.
- Lesson 7—Array-Oriented Programming with NumPy—numpy module’s high-performance ndarrays; how ndarrays differ from lists; comparing list vs. ndarray performance with the IPython %timeit magic; one-dimensional and multidimensional ndarrays; common ndarray manipulations; introduction to the pandas data manipulation library; one-dimensional pandas Series and two-dimensional pandas DataFrames; custom Series and DataFrame indices; basic descriptive statistics for data in a Series and a DataFrame; customizing pandas output formatting.
What you will learn in Part III (of five parts): - Lesson 8—Strings: A Deeper Look—String methods; string formatting; concatenating and repeating strings; stripping whitespace; string comparisons; searching strings for substrings and replacing substrings; tokenizing strings; regular expressions for pattern matching, replacing substrings and validating data; manipulating data in pandas.
- Lesson 9—Files and Exceptions—Text-file processing, serializing objects into JSON with the json module, with statement for avoiding “resource leaks,” exception handling, try…except statement, else clause, executing code when no exceptions occur in a try suite, finally clause, raise exceptions, more details on tracebacks, stack unwinding, CSV-file processing via the csvmodule, loading and manipulating CSV files in pandas.
- Lesson 10—Object-Oriented Programming—Custom classes, controlling access to attributes, properties for data access, simulating “private” attributes, Python special methods for customizing string representations, inheritance, duck typing, polymorphism, class object, Python special methods for overloading operators, named tuples, data classes, unit testing with doctest, namespaces, scope, intro to time series and simple linear regression.
- [New Lesson] What’s New in Python—[This lesson’s content will be merged into Lessons 3-10] f-string improvements for string delimiters in format placeholders, multiple selection with match…case, assignment expressions (:= “walrus” operator), statistics function modeupdate, statistics function multimode, pattern matching with match…case, positional-only parameters, Enums for creating named constants, comprehension inlining for better performance, starred unpacking expressions in for statements, optional length-checking for zip, self-documenting f-strings, dictionary union operators, keyword-only parameters, arbitrary keyword arguments (**kwargs), removing string prefixes and suffixes, named Unicode characters in regular expressions, adding notes to exceptions, exception groups and except*, type annotations for **kwargs, @override decorator for overridden methods in subclasses, type union operator for type hints, built-in collection types in type hints.
- Lesson 11—Natural Language Processing (NLP)—Install and use the TextBlob, NLTK, Textatistic and spaCy NLP libraries; tokenize text into words and sentences; parts-of-speech tagging (noun, verb, etc.); sentiment analysis (positive, negative or neutral); detect the language of text; translate between languages; get word roots via stemming and lemmatization; spell checking and correction; word definitions, synonyms and antonyms; removing stop words from text; creating word-cloud visualizations; determining text readability.
- Lesson 14—Machine Learning: Classification, Regression and Clustering—Use the scikit-learn library with popular datasets to perform machine-learning studies; use Seaborn and Matplotlib to visualize and explore data; perform supervised machine learning with k-nearest neighbors classification and linear regression; perform multi-classification with the Digits dataset; divide a dataset into training, testing and validation sets;tune hyperparameters with k-fold cross-validation; measure model performance; display a confusion matrix showing classification prediction hits and misses; perform multiple linear regression with the California Housing dataset; perform dimensionality reduction with PCA and t-SNE on the Iris and Digits datasets to prepare them for two-dimensional visualizations; perform unsupervised machine learning with k-means clustering and the Iris dataset.
- Lesson 15—Deep Learning—What neural networks are and how they enable deep learning; create Keras neural networks; Keras layers,activation functions, loss functions and optimizers; use a Keras convolutional neural network (CNN) trained on the MNIST dataset to build a computer vision application that recognizes handwritten digits; use a Keras recurrent neural network (RNN) trained on the IMDb dataset to create a sentiment analysis application that performs binary classification of positive and negative movie reviews.
- Lesson 16—Big Data: Hadoop, Spark, NoSQL (MongoDB) and IoT—[See Lesson 12’s note about Twitter/X eliminating their free-tier APIs, which affects this lesson’s NoSQL and Spark examples. We’ll replace uses of the Twitter/X API with other social media APIs.] Manipulate a SQLite relational database using SQL; understand the four major types of NoSQL databases; store tweets in a MongoDB NoSQL JSON document database and visualize them on a Folium map; Apache Hadoop and how it’s used in big-data batch-processing applications; build a Hadoop MapReduce application on Microsoft’s Azure HDInsight cloud service; Apache Spark and how it’s used in high-performance, real-time big-data applications; process mini-batches of data with Spark streaming; Internet of Things (IoT) and the publish/subscribe model; publish messages from a simulated Internet-connected device and visualize messages in a dashboard; subscribe to PubNub’s sample live streams and visualize the data.
The Following Lessons are Being Replaced
- Lesson 12—Data Mining Twitter—Note: X (formerly Twitter) eliminated the free-tier services that educational products like ours need for academic and professional audiences. We will replace this lesson with a similar one using other social media APIs.
- Lesson 13—IBM Watson® and Cognitive Computing—This will be replaced by several chapters on programming with generative AI APIs, Agentic AI and Artificial General Intelligence/Superintelligence.
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 social media, machine learning, deep learning, computer vision, Apache Spark™, NoSQL, IoT
- Integrated GenAI via prompt engineering in all lessons and programming with Python APIs in a new lesson
Source Code
Source Code
Not a GitHub user? Download the ZIP file
Share This Page