Chapter 1
From Records to Questions
Welcome to Data Analysis with Python
A neighbor has heard that you can program, and that the neighborhood runs a small network of weather stations. They ask you one thing: “Is North Hill wetter than Riverside?”
It sounds like a job for a few lines of code. Before you write any, try to say what an answer would look like. Wetter on which days? Measured at which stations? Compared how? A program can only answer a question that has been made precise, and making it precise is the first skill of this course.
What this course builds
This course teaches you to turn a messy table into answers you can defend. You will load and inspect data with
There are fourteen chapters. This one uses tools you already know from Python in Practice, csv and statistics, and shows where they start to strain. The rest of the course moves in stages:
Arrays (Chapter 2): meet
arrays, the engine underneath pandas. Loading and selecting (Chapters 3 and 4): load a table with pandas and pick out the rows a question needs.
Preparing and summarizing (Chapters 5 to 9): clean the data, derive new columns, summarize by group, combine tables, reshape them, and work with dates.
Charts and claims (Chapters 10 and 11): draw charts that answer a question, and ask what the data can and cannot say.
A pipeline and a capstone (Chapters 12 and 13): turn your work into a tested pipeline that rebuilds every result from the raw files, then analyze a new dataset in a capstone.
Next routes (Chapter 14): where you can go after this course.
You practice on the site, mostly in its project editor, where your files stay in place from one lesson of a chapter to the next. In the capstone you download the finished analysis and run it again on your own computer, the way you handled projects in Python in Practice.
Meet Monty
Monty, Python Land’s learning guide, sits beside every lesson. Ask it what an error message means, or for a hint that gets you moving without giving away the answer.
When you are signed in, your free account includes 5 Monty helps a day, shared across all courses. Open Monty and ask:
What makes a question about data precise enough to answer with code?
Guided gives you up to 50 Monty helps a day. Questions, hints, error explanations, extra practice, and code reviews share the same daily allowance. The counter shows what is left and when it resets. Every lesson and ordinary exercise retry remains free.
The data is synthetic
The weather stations in this course do not exist. A program written for this course generated their readings, for a neighborhood that is not on any map. That lets the course plant specific problems in the data, such as a failed sensor or a misspelled label, and know exactly where each one is, so the lessons that find them can check your work. It also means no real person’s or place’s data is exposed or misrepresented.
The data is shaped like real station data, flaws included, but whatever you find describes this generated network, not the weather of any real place.
Suppose your analysis finds that North Hill had fewer wet days than Riverside. Which sentence can your report make?
The next lesson starts on the first skill of the course: making the neighbor’s question precise.