遍历pd.Series的index和value的方法如下,python built-in list的enumerate方法不管用 for i, v in s.items(): print('index: ', i, 'value: ', v) #index: a value: 1 #index: b value: 2 #index: c value: 3 #...
/usr/bin/python# -*- coding: utf-8 -*- import os def del_files(path): for root , dirs, files in os.walk(path): for name in files: if name.endswith(“.tmp”): os.remove(os.path.join(root, name)) ...