import pandas as pd
inputfile = pd.read_csv('inputfile.csv')
output_file=inputfile.sort_values('time')
df = pd.DataFrame(output_file)
df.to_csv("Outputfile.csv",index=False)
new_file = pd.read_csv('Outputfile.csv')
j=1
i=0
for k in new_file.Application:
if new_file.time[i]+new_file.time[j] >= 3.0 and `
new_file.time[i]+new_file.time[j] <= 5:
new_val = new_file.time[i]+new_file.time[j]
print(new_file.Application[i], `
",",new_file.Application[j],"=",new_val)
i += 2
j +=2
print(new_file.Application[i], "=", new_file.time[i])
i +=1
我在这里遇到错误i += 1