📅  最后修改于: 2022-03-11 14:46:27.445000             🧑  作者: Mango
import csv
csv_file = csv.reader(open("your_file_name.csv"))
dist = 0
for row in csv_file:
_dist = row[2]
try:
_dist = float(_dist)
except ValueError:
_dist = 0
dist += _dist