Python CSV Files Example

Do you like this?

This shows you how to use Python to access data in CSV files.


import csv

with open('sample.csv', 'rb') as csvfile:
    spamreader = csv.reader(csvfile, delimiter=',')
    for row in spamreader:
        print row
What you get is a list of arrays of values as follows:

comments powered by Disqus