python通过csv模块读取CSV文件csv模块读取CSV文件超级简单,和读取普通文件一样
#!/usr/bin/env python # -*- coding:utf-8 -*- import csv with open('egg.csv','rb') as f: reader = csv.reader(f) for row in reader: print row
python通过csv模块读取CSV文件csv模块读取CSV文件超级简单,和读取普通文件一样
#!/usr/bin/env python # -*- coding:utf-8 -*- import csv with open('egg.csv','rb') as f: reader = csv.reader(f) for row in reader: print row