Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Papermill + executing only one cell #725

Open
sarahdejong opened this issue Jun 5, 2023 · 1 comment
Open

Papermill + executing only one cell #725

sarahdejong opened this issue Jun 5, 2023 · 1 comment

Comments

@sarahdejong
Copy link

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!

@ajasja
Copy link

ajasja commented Feb 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants