import pandas as pd
import numpy as np
data=pd.read_csv('result1.csv',encoding='gbk')
for i in range(0,30):
if i%3==0:
data1=np.array(data)
datas=data1[int(i):int(i+3),]
datanew=pd.DataFrame(datas)
datanew.head(4)
datanew.columns=['','frequency','price','name']
df=pd.DataFrame(datanew)
datanew2=df.sort_values(by=('price'))
datanew2.to_csv('C:/Users/HP/Desktop/python_work/result6.csv',encoding='gbk')
print(datanew2)
continue
结果图片