If you need to upload into csv files separately during that iteration then below code follows, If this is what your looking or else please review your question
for j in range(0, 500):
    for k in range(1,9):
        try:
            file_name="Result_"+str(i)+'_'+str(j)+'.csv'
            df1 = url_base_1 + str(j) + url_base_2
            df2 = make_dataframe(df1.format(year), int(k))
            print(k)
            df2.to_csv(file_name,encoding='utf-8', index=False)
        except:
            pass
The output files will be in this format Result_0_1.csv, Result_0_2.csv and so on.
2
solved Python Unique DF in loop [closed]