Created
September 19, 2023 01:24
-
-
Save 668168/ec48d07a5c571826f6364b80cdfecddf to your computer and use it in GitHub Desktop.
读取csv的标准方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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