# Revision history [back]

Actually, this is not related to ipython notebook but about Python, you can have a look at the csv module

To import csv:

sage: import csv


In your case, the delimiter is not a coma, but a sequence of spaces, so you have to tell csv that the delimiter is a space (you can only use a single character for the delimiter), and that the other spaces should be skipped.

Now, you can load your csv file and loop to each of its rows, and each row will be a list of columns:

sage: with open('/tmp/plop.csv', 'rb') as my_file: