xlsx_usage.py 文件源码

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

项目:table-compositor 作者: InvestmentSystems 项目源码 文件源码
def render_xlsx(cls):
        '''
        Render the df to a xlsx file.
        '''

        # load data
        df = sample_names_data()
        # build presentation model
        pm = tc.build_presentation_model(df=df, output_format='xlsx')

        # render to xlsx
        tempdir = tempfile.gettempdir()
        fp = os.path.join(tempdir, 'example1.xlsx')
        layout = [pm]
        print('Writing to ' + fp)
        xlsxw.XLSXWriter.to_xlsx(layout, output_fp=fp)
# end_XLSXExample1


# start_XLSXExample2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号