writer = pd.ExcelWriter(os.path.join(base_path, "clf3_data", "sample.xlsx"), options={'strings_to_urls': False})
# yiliao_data 是python list
pd.DataFrame(yiliao_data).to_excel(writer, sheet_name="yiliao", encoding='utf-8')
pd.DataFrame(yimei_data).to_excel(writer, sheet_name="yimei", encoding='utf-8')
pd.DataFrame(other_data).to_excel(writer, sheet_name="other", encoding='utf-8')
writer.save()
pandas保存list到xlsx中
最新推荐文章于 2024-01-30 16:12:15 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)