def approach_pipe_4b():
a = (PN4.name_count_per_year(lambda n: n.lower().startswith('lesl'))
| PN4.percent | fpn.store('lesl'))
b = (PN4.name_count_per_year(lambda n: n.lower().startswith('dana'))
| PN4.percent | fpn.store('dana'))
f = (PN4.merge_gender_data(lesl=a, dana=b)
| PN4.year_range(1920, 2000)
| fpn.store('merged') * 100
| PN4.plot('gender.png')
| PN4.open_plot)
pni = PN4.PNI('/tmp')
f[pni]
xlsx_fp = os.path.join(pni.output_dir, 'output.xlsx')
xlsx = pd.ExcelWriter(xlsx_fp)
for k, df in pni.store_items():
df.to_excel(xlsx, k)
xlsx.save()
os.system('libreoffice --calc ' + xlsx_fp)
评论列表
文章目录