Code that runs once and gives you a number is not worth much. We are after code someone else can run next year and get the same number.
The whole plan is on the next slide. Nothing on it is a surprise later.
Noel Jeffrey Pinton · Department of Computer Science
The first month is the steepest. After that you are mostly learning libraries — bundles of ready-made code other people wrote, which you load into your own work — and that is much easier than learning to program.
Most names on this slide (NumPy, pandas, SQL, Git…) are tools you have not met yet. You do not need to know any of them today — each one is explained in the week it arrives.
Setting up Python, then types, control flow, functions, data structures and files. Week 4 is where code stops being one long script — objects, errors, and how to organise a project.
NumPy for arrays, then two weeks of pandas because it earns them — grouping, merging, reshaping. Then matplotlib and seaborn, so the result is something you can show a person.
Reading from files, SQL and APIs. Regular expressions for text that refuses to be tidy. Then Git, environments and debugging — the habits that make Week 12 survivable.
One project that uses most of the above, and you present it.
You are not here to become a software engineer. You are here because a spreadsheet eventually stops being enough, and code is what comes next.
A script — a file of code, the written instructions a computer carries out — states exactly what you did. Next month, it still says the same thing.
The work is the same whether the file has a hundred rows or a million.
Someone else can read your analysis and find your mistake — which is the point.
Not “know Python”. That phrase means nothing. These four are checkable.
Open an unfamiliar script and work out what it does. You will do this far more often than you write anything from scratch.
Load, filter, group, join and reshape a real dataset in pandas, instead of clicking through a spreadsheet and hoping.
Not a default chart with a default title. One where the choice of chart is itself the point being made.
A project with pinned dependencies and a README that runs on a machine which is not yours.
We meet on Saturdays for three contact hours. Everything around that is yours to schedule.
Slides for every week stay here permanently. Nothing important is only said out loud, so missing a session is recoverable.
Struggling is how this is learned — but struggling alone for three days is not. There is a limit, and it is half an hour.
Learn the layout once and you can study any week on your own, at your own speed.
Arrow keys or space bar (or the ‹ › buttons at the top). F is full screen. The bar along the bottom shows how far through the deck you are.
A new word is explained on the slide where it first appears. Each week opens with a Words for today slide and ends with a glossary of all the new words.
Pick an answer in your head first, then click and hold (or tap) the question to see the answer and why. Guessing wrong here is free — and it is how the idea sticks.
A dark slide starts a new part (and says how it connects to what you know) or marks a good place to pause. Stopping there is part of the plan.
Treat each deck like a textbook chapter you can click through: read, predict, reveal, and stop at the dark slides.
From Week 2 on, you can run Python right inside the slides and the labs — nothing to install. Python is downloaded into your web browser the first time.
____ (four underscores) in the code with your answer.The slides show you an idea; the Run button lets you poke at it; the lab asks you to use it. A red error message in either place is normal — read its last line, change something, and run again.
There are no prerequisites beyond graduate standing. We begin at types and control flow in Week 2 — genuinely from the start.
You are the student this course is designed around. Nothing assumes you have seen a terminal (a window where you type commands instead of clicking) before.
The novelty is the data stack — the set of libraries data scientists use together: NumPy, pandas, matplotlib — and the habits that make analysis reproducible.
Programming is learned by hand. There is no version of this where you watch and absorb it.
Retype the examples — including the parts you are sure you already understand. That is where the surprises are.
Change a line, predict what will happen, then run it. Being wrong about the prediction is the whole lesson.
A traceback is the error report Python prints when a line fails. It names the file and the line, and its last line says what went wrong. Most people scroll past the one piece of information they needed.
The project is not a week of work. The people who begin early are the ones who finish calm.
Start in the browser. Nothing to install, nothing to break, and it works the same on every machine.
Go to colab.research.google.com and sign in with a Google account. Colab is Google’s free notebook website.
New notebook, type print("hello"), press Shift+Enter. That is the whole task.
Want a local setup? Install Anaconda too — but Colab alone is enough to start.
print("hello")No need to memorise them now — Week 1 explains each one again, with examples. This is just so none of them is a surprise.
Written instructions, in a programming language, that the computer carries out exactly.
e.g. print("hello") is one line of code
The programming language this course uses — popular because it reads almost like English.
e.g. 1 + 1 is valid Python; it gives 2
A document of boxes that mix text and runnable code. Colab and Jupyter show notebooks.
e.g. the file you open in Colab on the previous slide
One box in a notebook. Run it with Shift+Enter; its result appears underneath.
e.g. a cell containing 1 + 1 shows 2 below it
A bundle of ready-made code someone else wrote, which you load into your own work.
e.g. pandas, a library for tables
A name that holds a value, like a labelled box you can look inside later.
e.g. price = 100 puts 100 in a box labelled price
Python stopping to tell you it could not do what a line asked. Normal, and fixable.
e.g. misspelling a name gives a NameError
The report Python prints with an error. Read its last line first: it says what went wrong.
e.g. NameError: name 'pirce' is not defined
We start where the spreadsheet gives up, sort out which library does what, and spend real time on error messages. You will read a lot of those this semester, so you may as well stop fearing them in week one.
Week 1 slides are already on the course page. Read ahead if you want to.