I've seen a lot of posts about doing this backwards, but I haven't been able to find any way to write the contents of a column in a csv file to a list. After I have this I'll loop through to add all of the unique value to a separate list and count the number of total unique values. This is what I have:
b=[]
c=[]
servers = []
fname=(r'file')
with open(fname, 'r') as f:
    reader = csv.reader(f)
    severities = Counter(row[3] for row in reader)
    servers = list(row[9] for row in reader)
    for row in reader:
        print (row[9])
        for servername in servers:
            if servername not in b:
                b.append(servername)
I'm open to better ways to do this. Any and all help is appreciated. Thanks in advance.
readertwice, at least not without rewindingfto the start withf.seek(0). Not that that would be the efficient way of doing it.Counter()of the 4th column (row[3]) and a unique list of the 10th column (row[9])? You are not usingchere, is that needed at all?