python关于指定路径CSV文件的读取:
#-*- coding: utf8 -*-
import csv
csv_reader = csv.reader(file('/Users/wangzhao/Downloads/test.csv','U'))
for row in csv_reader:
print(row)
用file 和open都可完成文件的读取
#-*- coding: utf8 -*-
import csvcsv_reader = csv.reader( open('/Users/wangzhao/Downloads/test.csv','U'))
for row in csv_reader:
print(row)