Skip to content

Instantly share code, notes, and snippets.

@668168
Created September 19, 2023 01:24
Show Gist options
  • Save 668168/ec48d07a5c571826f6364b80cdfecddf to your computer and use it in GitHub Desktop.
Save 668168/ec48d07a5c571826f6364b80cdfecddf to your computer and use it in GitHub Desktop.
读取csv的标准方法
unique_names = []
with open(unique_names_file, 'r', encoding='utf-8') as f:
reader = csv.reader(f)
for row in reader:
if BUS_NUM != int(row[2]):
continue
unique_names.append(row)
print(unique_names)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment