可以使用 Python 的 csv 模块来读取 csv 文件中的某一列。
import csv
# 指定 csv 文件路径
file_path = 'path/to/file.csv'
# 创建空列表
column_data = []
# 使用 with 语句打开 csv 文件
with open(file_path) as csv_file:
# 读取 csv 文件
csv_reader = csv.reader(csv_file)
# 跳过标题行
next(csv_reader)
# 遍历每一行
for row i