Code1:
import pandas as pd
df1 = pd.DataFrame({'a':[3,1],'b':[4,3]})
df2 = df1.copy()
with pd.ExcelWriter('*.xlsx') as writer:
str1 = ['a','b','c','d','e','f','g','h','i', 'j','k','l','m','n','o','p','q']
for i in str1:
name = str(i)
df1.to_excel(writer, sheet_name= name)
# writer.save()
# writer.close()
最后
以上就是专注书包最近收集整理的关于【笔记】将数据写入excel的多个sheet中的全部内容,更多相关【笔记】将数据写入excel内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复