1.读写
information = open(current_image_dir+"/information.csv",'w')#读写文件
information.write("image,"+"SN,"+"axelindex"+"\n")#写文件
information.close()#关闭文件流
2.添加元素和修改值,查询
df = pd.read_csv(img_path+'\\information.csv')
df['Detect'] = '0000'#pandas添加一列
df["Detect"].ix[1] = "1234" #修改Detect列的某行的值
df[df["Detect"] =="1234"]["image"].tolist()#查找Detect中某个值,查找到的image列转换为list
3.查询
from collections import Counter
counter_result = Counter(df["Detect"]).most_common(3)