import csv file = 'D:\\1.csv' with open(file, encoding="UTF8") as f: reader = csv.reader(f) # 创建 读取器 header_row = next(reader) # 获取表的第一行(一般是列名) print(header_row) # 打印 first_row = next(reader) # 获取标的第二行 print(first_row)