我有 :
list_of_DataFrames = [df_1, df_2, df_n, ...]
我想将每个这些数据帧写入一个不同的excel文件中。
我试过了 :
list_of_DataFrames.to_excel("pathTo/ExcelFile.xlsx")
该列表没有to_excel
方法。您唯一的方法是遍历列表。
for i in range(len(list_of_DataFrames)):
list_of_DataFrames[i].to_excel("pathTo/ExcelFile-{}.xlsx".format(i))
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句