貌似python3有 dict.keys()的用法
values_cnt = {} percent_cnt={} with arcpy.da.SearchCursor(fc, self.filed) as cursor: for row in cursor: f_value.append(row[0]) for value in f_value: values_cnt[value] = values_cnt.get(value, 0) + 1
python2对中文支持太垃圾了...
with open(self.file_save_dir.decode('utf-8'), 'w+') as f:
防止乱码,另外,Unicode u'**'
utf-8 '\xe5 \b7'
gbk \bpa \xae