Python(csv 模块)

1、读取 csv 文件中的数据 reader() 返回一个 reader 对象,利用该对象遍历 csv 文件中的行 从 csv 文件中读取的每一行都作为字符串列表返回 import csv # data_info.csv 是文件名称 with open("data_info.csv","r") as f: data = csv.reader(f) for d in data:
相关文章
相关标签/搜索