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:

  1. i find run parts of ipython notebook in loop / different input parameter, it's run part of cells within notebook.

  2. 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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

android - CoordinatorLayout, FAB and container layout conflict -