Topics
Total pages: 14
File: topics/topic-01.md - Weight: 10
File: topics/topic-02.md - Weight: 20
File: topics/topic-03.md - Weight: 30
File: topics/topic-04.md - Weight: 40
File: topics/topic-05.md - Weight: 50
File: topics/topic-06.md - Weight: 60
File: topics/topic-07.md - Weight: 70
File: topics/topic-08.md - Weight: 80
File: topics/topic-09.md - Weight: 90
File: topics/topic-10.md - Weight: 100
File: topics/topic-11.md - Weight: 110
File: topics/topic-12.md - Weight: 120
File: topics/topic-13.md - Weight: 130
File: topics/topic-14.md - Weight: 140
Overview of class topics. Click on the titles for details.
Class Dates: 2026-08-26
This session introduces Python and the environment you will be working in for the rest of the term.
Class Dates: 2026-09-02
This session introduces Python as a language with its own syntax and conventions, establishing the habits of readable, consistent code before any complexity is added.
Class Dates: 2026-09-09
This session covers fundamental Python data structures, iteration techniques, and practical loop patterns, using a campus coffee cart sales dataset as a practical working example.
Class Dates: 2026-09-16
Decomposition is how a problem too large to hold in your head becomes a handful of steps you can name, write, and check one at a time. In Python those steps are functions: each one a contract with a single responsibility and clear expectations about its inputs, its return value, and its edge cases.
Class Dates: 2026-09-23
A file outlives the session that created it, which is what allows one program’s output to become another’s input. Safe file handling rests on a few habits: a with block that closes the file whatever happens, an explicit UTF-8 encoding, input and output locations that are named rather than assumed, and a read-back of anything written. Which format to write in depends on the shape of the data. CSV suits simple rectangular tables and moves easily between spreadsheets and programs, at the cost of careful handling of headers, quoting, embedded commas, missing fields, and the conversion of every value from text. JSON carries structured documents — nested objects and lists, numbers, booleans, and null — which makes it a fit for configuration, metadata, API payloads, and records that are not flat. JSONL puts one complete JSON record on each line, so large collections of independent records such as logs, events, and model outputs can be appended and processed one record at a time.
Class Dates: 2026-09-30
Unix presents every disk, every home directory, and every data file as one tree rooted at /, and gives you a text interface for moving through it. Learn where you are (pwd), what is there (ls), and how to get elsewhere (cd), and the rest — absolute versus relative paths, . and .., ~ — stops being syntax to memorize and becomes a map you can read.
Class Dates: 2026-10-07
Business applications rarely keep their data in one giant table. Customers, orders, order lines, and products each describe a different thing at a different grain, so each gets its own table, linked to the others by primary and foreign keys. That design, which Microsoft’s Northwind sample database illustrates, avoids repeated and inconsistent copies, and it gives a report its shape: joins build the view a question needs. Reading a table well starts with three questions: what does one row represent, which columns identify it, and what type is each column? Add a fourth: which values are missing? A null means unknown, not zero, and SQL and pandas each have their own rules for how nulls behave in filters, counts, and sums.
Class Dates: 2026-10-14
With pandas, most questions about a table are one line of code, and that line always returns a number. It does not know whether the file had blank cells, whether a price was stored as the word "None", whether a date of 1 January 1900 was real or a placeholder, or whether half of one group’s records were missing. It computes anyway, and a wrong answer looks exactly like a right one. So data analysis is less about the computing line than about what comes before it: what one row stands for (the grain), what types the columns have, which values are wrong, disguised, or impossible, and what a blank means — zero, unknown, or not applicable. Those three readings can put an average a factor of two apart, and no error message raises the question for you.
Class Dates: 2026-10-21
Nobody can read ten thousand rows. To tell anyone what is in a table you have to reduce it, either to a few numbers or to a picture, and each loses different information. A summary number is exact and fits in a sentence, and it hides the shape of the data: the mean and the median are both called “the average”, and under skew — incomes, prices, review counts, waiting times — they can be far apart, because one extreme value moves the mean and leaves the median where it was. The same split runs through spread: variance and standard deviation are built on sums and inflated by extremes, quartiles and the interquartile range are built on order and are not. An outlier is a question, not an error. It may be a mistake, a different kind of thing, or the most important row in the table, so it is flagged, looked at, and then decided on — never deleted on sight.
Class Dates: 2026-10-28
Some questions cannot be answered by looking something up, because the answer depends on things that have not happened yet and that vary by chance: how many pastries to bake when the number of customers changes from day to day, or whether one person at a service desk is enough when people arrive in bursts. For a few such questions there is a formula; for most there is not. A simulation works regardless: build a small model of the situation, let the computer live through it thousands of times, and count what happens. A computer cannot produce chance, so its random numbers are pseudorandom — a sequence fixed entirely by its seed — and that is a feature, because a result that cannot be repeated cannot be checked or debugged. The discipline is one generator, made once from a seed and passed to every function that draws; a generator created inside the loop restarts the sequence, and every trial becomes the same trial.
Class Dates: 2026-11-04
Almost every program looks things up: is this customer already in the list, which product has this id, which records have no match in the other file? On a hundred records any way of answering is instant. On a million, the way you answer decides whether the program finishes in a second or is still running after lunch, and the two programs look almost identical — both say if x in collection. So the question is what a lookup costs and how that cost grows with the data, and the steady way to measure it is to count comparisons rather than time them. Linear search looks at each item in turn, needs nothing from the data, and costs about n/2 comparisons for a key that is there and all n for one that is not. Once is harmless; inside a loop over another large collection it is quadratic, the usual reason a program that worked on a sample never finishes on the full file.
Class Dates: 2026-11-11
A table describes things: one row per customer, per product, per airport. Some questions are not about the things at all but about what lies between them. How do I get from Atlanta to Sydney, and with how many changes? Which pages can be reached from the home page? If this road closes, is the town cut off? None of these is a filter, a join, or a group-by. They are questions about connections, and the structure for them is a graph: a set of nodes and a set of edges between pairs of them, where an edge may have a direction and may carry a weight. Often the hardest step is the first — recognising that a word puzzle, a course catalogue, and an airline timetable are the same problem. An edge list is the natural form for a file and a poor one to ask; an adjacency list, a dictionary mapping each node to its neighbours, puts every node’s connections one lookup away, provided every node is a key.
Class Dates: 2026-11-18
Every program earlier in this course followed a rule that a person wrote. Some rules nobody can write down: which customers are about to cancel, which transactions are fraudulent, which restaurants will have closed by next year. What usually does exist is a record of past cases with their outcomes, and machine learning is the idea of handing those examples to a program and letting it find the rule. The table is cut into features, what the model may look at, and a target, what it should predict. Producing predictions takes three lines of scikit-learn; the problem is everything around them. A model that is wrong raises no error. It prints a number, and the number looks fine. So the most important habit in the subject comes before any learning: put some rows aside as a test set, let nothing that is learned or chosen use them, and measure on them once, at the end. Before any model, compute the baseline — always answering with the more common class — because “70 % accurate” means little if always saying “no” scores 67 %.
Class Dates: 2026-12-02
Revisit the course as a connected whole rather than a list of topics: values and types, control flow, functions, files, tabular data, and algorithmic ideas are the layers of a single toolkit, and a realistic task uses several at once. Treat debugging explicitly as a systematic method — reproduce the failure, read the error, form a hypothesis, shrink the input, test one change at a time — and contrast it with guess-and-rerun, which is where beginners lose the most time. Consolidate reproducibility as the through-line of the second half of the course: clear file organization, code that runs from the command line, fixed random seeds, and a commit history that records how the work developed. Close by connecting these skills to what comes next, including where each idea reappears in later statistics, analytics, and machine learning coursework.