Reading CSV files in Python
name,age,city
Alice,20,Toronto
Bob,22,Montreal
Charlie,25,Vancouver1) Read Entire CSV
2) Skip Header
3) Print First Column
4) Print Second Column
5) Print Third Column
6) Count Rows
7) Print Ages as Integers
8) List of Names
9) Names Above Certain Age
10) Print in Formatted Lines
11) Read Using DictReader
12) Print Names Using DictReader
13) Print Age + City Together
14) Sum of Ages
15) Average Age
16) Unique Cities
17) Search Name
18) Save Ages to List
19) Count by City
20) Print All Rows Reverse Order
π Useful Code Snippets
Basic Reader
DictReader
π Notes for Students
Last updated