Number of cells, using CSV module
tunacubes at gmail.com
tunacubes at gmail.com
Thu May 16 14:29:25 EDT 2013
I'm using the csv module to get information from a csv file. I have items listed in Column A. I want to know how many items are listed in Column A.
import csv
with open('test.csv', 'r') as f:
reader = csv.reader(f)
for column in reader:
column = (column[0])
print(column)
We are given
>a
>b
>c
>d
>e
>f
How would I go about getting the amount of numbers that are printed? If I try printing len(column), I get
>1
>1
>1
>1
>1
>1
More information about the Python-list
mailing list