python中 打开csv文件
代码:importcsvreader=csv.reader(open('E:\BigData\tianchi_mobile_recommend_train_user.cs...
代码:import csv
reader = csv.reader(open('E:\BigData\tianchi_mobile_recommend_train_user.csv','r+'))
for row in reader:
print row
报错:
Traceback (most recent call last):
File "E:\BigData\user.py", line 3, in <module>
reader = csv.reader(open('E:\BigData\tianchi_mobile_recommend_train_user.csv','r+'))
IOError: [Errno 22] invalid mode ('r+') or filename: 'E:\\BigData\tianchi_mobile_recommend_train_user.csv' 展开
reader = csv.reader(open('E:\BigData\tianchi_mobile_recommend_train_user.csv','r+'))
for row in reader:
print row
报错:
Traceback (most recent call last):
File "E:\BigData\user.py", line 3, in <module>
reader = csv.reader(open('E:\BigData\tianchi_mobile_recommend_train_user.csv','r+'))
IOError: [Errno 22] invalid mode ('r+') or filename: 'E:\\BigData\tianchi_mobile_recommend_train_user.csv' 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询