发布时间:2019-08-06 09:13:35编辑:auto阅读(1419)
import sys, os, csv
data_file = 'C:/Users/81080/Desktop/class.csv'
im_file = 'D:/class_im/'
fileNames_1 = os.listdir('D:/class_im/')
csvfile = open(data_file, 'r')
csvreader = csv.reader(csvfile)
key_url_list = [line[:2] for line in csvreader]
for i in range(14499,len(key_url_list)):
fileNames_1 = os.listdir('D:/class_im/')
(key, id) = key_url_list[i]
if key in fileNames_1:
os.rename(os.path.join(im_file, key), os.path.join(im_file, id) + ".jpg")
上一篇: python获取代码运行时间
下一篇: python中令人蛋疼的地方及一些技巧
47494
45794
36793
34324
28968
25598
24443
19611
19111
17632
5466°
6048°
5570°
5638°
6573°
5376°
5378°
5884°
5855°
7170°