excel.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:financial_life 作者: MartinPyka 项目源码 文件源码
def report(simulation, filename='report.xls'):
    """ This function generates a report as an excel sheet.

    simulation      the simualation that should be exported to excel
    filename        filename of the excel file
    """

    writer = pd.ExcelWriter(filename)
    for account in simulation.accounts:
        df = account.report.as_df()
        df.to_excel(writer, sheet_name=account.name)
    writer.save()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号