python中操作csv文件 读取csv improt csv f = csv.reader(open("文件路径","r")) for i in f: print(i) 结果会以列表形式输出 写入csv文件 import csv data = [ ('xxx','xxxx','xxxx'), ('xxx','xxxx','xxxx'), ('xxx','xxxx','xxxx') ] f = open('文件路径', 'w') # 创建文件操作对象 writer…
1.什么是csv文件 The so-called CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180. 2.…