python - Jupyter Notebook: How to re-run notebook with different parameters (e.g. input data file)? -
i have notebook, can complex data analysis one dataset. @ end, saves notebook , converts html
, can view result later without running notebook again. 1 example this:
https://cdn.rawgit.com/cqcn1991/wind-speed-analysis/master/output_html/marham.html
now, want run notebook on many, different datasets. how can it?
maybe like
files = [ './data/ncdc/cn/binhai/dat.txt', './data/ncdc/cn/luogang/dat.txt', "./data/ncdc/cn/tianjing/dat.txt", "./data/ncdc/cn/gushi/dat.txt", "./data/ncdc/cn/yueyang/dat.txt", ] input_file_path in files: run_notebook('gmm.ipynb', input_file_path)
my thougths:
i find run parts of ipython notebook in loop / different input parameter, it's run part of cells within notebook.
scientific computing & ipython notebook: how organize code? provides solution run notebook within host notebook. however, it's not target notebook gets runned, target notebook's code run within host's environment. leaves original notebook un-changed, , when saving html, results same.
Comments
Post a Comment