DeskFluent
Module 3 Pro9 min read

Reading a spreadsheet with code

Opening a CSV, filtering rows and writing the result back out.

Module 2 ended its spreadsheet lesson with a promise: in Module 3 you would read a spreadsheet with Python — same habits, bigger lever. That is this lesson. Everything you have built so far — variables, types, lists, loops, if — clicks together here into the first genuinely useful thing you can do with code.

The file format everything speaks

Here is a tiny one. If you opened a file called orders.csv in a plain text editor, you would see:

name,city,amount Priya,London,4500 Amit,Toronto,3200 Sara,London,5100 Leo,Sydney,2800

First line: the column headings. Every other line: one row. That is the entire format. Both Excel and Google Sheets can save any sheet as CSV (File → Download, or Save As, then choose CSV) — which is how real spreadsheets become Python-readable.

Keep reading with Pro

You are reading the free preview. Module 1 of every course is free forever — Pro unlocks the rest of this lesson, every other module of every course, removes ads, and adds workbooks and certificates.