papermill
papermill copied to clipboard
Papermill + executing only one cell
Hi! I'm using papermill to run my input notebook for different parameters and then export them all to htmls. In my input notebook, I have the following cell, because I need to rerun a cell earlier in the notebook.
from IPython.display import Javascript Javascript("Jupyter.notebook.execute_cells([20])")
This works fine when running the original input notebook by itself, but when running it with papermill it doesn't seem to work. Is there any way to make it work, or alternatively, is there a way in papermill to run only one cell of a notebook (then I could potentially export the data I need to csv and run it a second time with only that cell)?
Thank you very much!
If you are rerunning only one cell, it probably makes sense to convert this cell into a function. Then you can call it multiple times without problems.