import csv
file_location = " "
csv_file = open(file_location, 'r', encoding='utf-8')
dict_file = csv.DictReader(csv_file)
for row in dict_file: # type(row) = <class 'collections.OrderedDict'> 是字典,按照元素放入的顺序排序。字典的键是列标题,值是某行对应列标题下面的值
sub_str = row['sub']
print(sub_str)
注意,这个不能输出第一行的内容