我有一个latin1编码文件。我如何使用csv
完成与以下相同的操作?
>>> import csv
>>> with open(filepath, 'rb') as csvfile:
... reader = csv.DictReader(csvfile, delimiter='\t', encoding='iso-8859-1')
答案 0 :(得分:3)
with open(filepath, "r", encoding="ISO-8859-1") as csvfile:
reader = csv.DictReader(csvfile)
答案 1 :(得分:0)
这是一种可以做到的方法:
DATE