'vsep': 'l', 'headers' : [u'Milioni di €', 'AAAAAAAAAAAAAAA']}, 'B': {'order': 1, 'align': 'c', 'vsep': 'b', 'headers' : [u"""Milioni di €""", 'BBBBBBBBBBBBBBBBB']}, 'C': {'order': 2, 'align': 'r', 'vsep': 'r', 'headers' : ['@v1', 'CCCCCCCCCCCCCCCCCCCC']}, } } } df = pandas.DataFrame({ 'A': np.random.rand(10) * 100000, 'B': np.random.rand(10) * 100000, 'C': np.random.rand(10) * 100000, }) base = '/tmp/test/' if not os.path.isdir(base): os.makedirs(base) mybag = Bag(df, md=md, stype='tab') mybag.save(os.path.join(base, 'mybag.pickle')) assert test_latex() == 0 assert test_html(mybag) == 0
'a': [59.9, 46.2, 0], 'b': [13.6, 7.1, 2], }) plot = Bag(df, md=lm_plot, stype='graph') bar = Bag(df, md=lm_bar, stype='graph') sidebarh = Bag(df, md=lm_sidebarh, stype='graph') sidebar = Bag(df, md=lm_sidebar, stype='graph') barh = Bag(df, md=lm_barh, stype='graph') scat = Bag(df_sc, md=lm_sc, stype='graph') base = '/tmp/test/' if not os.path.isdir(base): os.makedirs(base) plot.save(os.path.join(base, "plot.pickle")) bar.save(os.path.join(base, "bar.pickle")) barh.save(os.path.join(base, "barh.pickle")) sidebar.save(os.path.join(base, "sidebar.pickle")) sidebarh.save(os.path.join(base, "sidebarh.pickle")) scat.save(os.path.join(base, "scatter.pickle")) fd = open(os.path.join(base, 'main.tex'), 'w') try: fd.write(TEMPLATE) finally: fd.close() # # Generate config file (not mandatory) # fd = open(os.path.join(base, 'config.cfg'), 'w') # try: