with open('apple.csv') as f:
reader = csv.reader(f)
headers = next(reader) # 一般第一行是属性名
Row = namedtuple('Row',headers)
for r in reader:
row = Row(*r)
print(row)
with open('a.csv') as f:
reader = csv.DictReader(f)
for row in reader:
print(row)
json中的false为None
sheet.row_values(index) 获取索引指定的数据行
原文:https://www.cnblogs.com/linyk/p/11530342.html