I need to output CSV files in a loop. Using pandas
for i in range(1,int(len(feed_file_order)/2000)+2):
print(i)
final_frame = final_frame.append(feed_file_order[u:(2000*i)])
u=u+2000
final_frame.drop(final_frame.index, inplace=True)
final_frame.to_csv('C:\\Users\\7005243\\Desktop\\trail_i.csv')
I want my output csv files as trail_1, trail_2 etc.
'C:\\Users\\7005243\\Desktop\\trail_i.csv'tof'C:\\Users\\7005243\\Desktop\\trail_{i}.csv', it should work. The problem was thatiin your case was the character i and not the variableii