Read and write CSV files with Python

I am analyzing a trace in GTFS, a collection of CSV files. Each record of a csv file is consisting of one or more fields speparated by commas ,. It is error-prone to read csv files by simply using [line.split(',') for line in f.readlines()] for fields might contain commas. Therefore, I decide to switch to the Python module csv.

Read more