i would like to save a different dataframe in different excel pages withb a simpler loop. How can i construct correctly this loop?
my Currently codes are:
for fund in list(read_ex.keys()):
writer = pd.ExcelWriter(excel_file, engine='xlsxwriter')
data_2 .to_excel(writer, sheet_name= 'Df_ag')
read_ex[fund] .to_excel(writer, sheet_name= fund[:28])
writer.save()
but the returns are only two page: the data_2 and the last in the loop. Thank you for your time!
Imopla