# csv Module

*noun*

say it: **“SEE-ess-VEE MOJ-ool”** **/ˌsiɛsˈvi ˈmɑdʒul/**

Python's built-in module for reading and writing CSV files, the plain-text tables that spreadsheet apps can open and save.

## What is the **csv module**?

The **csv module** is Python's built-in module for CSV files. `csv.DictReader` reads each row as a dictionary named by
the header row, and `csv.writer` and `csv.DictWriter` write rows back out.

```python
import csv
with open("runs.csv", newline="") as file:
    for row in csv.DictReader(file):
        print(row["runner"], row["miles"])
# Ana 3.1
# Ben 5.0
```

## In a sentence

- “With the **csv module**, a name with a comma in it stays in one column.”
- “The running club's script uses the **csv module** to read every runner's miles.”

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/csv-module
