I have a csv file and I have to compute the mean for some of the columns. That\'s how I did:
file=csv.reader(open(\'tab.csv\',\'r\')) n=[] for row in file:
Just add quoting:
with open('tab.csv', newline='') as file: reader = csv.reader(file, quoting=csv.QUOTE_NONNUMERIC) n=[] for row in reader: n.append(row[8])