I am pulling data from a csv file and have it printing out three letter country codes from each row of data. How do I make python identify the number of occurrences of each unique country code from the outputted data? Here is what I have that is printing the country codes.
import csv
with open('2017CountryData.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
countries = row[1]
print(countries)