Hey! So, I’ve actually done this before using `nbconvert`. You can execute a notebook within a notebook by running something like this:
```python
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
with open('notebook_to_run.ipynb') as f:
nb = nbformat.read(f, as_version=4)
ep = ExecutePreprocessor(timeout=600, kernel_name='python3')
ep.preprocess(nb, {'metadata': {'path': './'}})
```
This will execute the notebook and save the results. It’s pretty handy for automating workflows. You might wanna check out the official `nbconvert` docs for more details.
Also, if you’re into automation, `papermill` is another solid option. It’s designed for parameterizing and running notebooks, so it might fit your use case better.
Hope this helps!
```python
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
with open('notebook_to_run.ipynb') as f:
nb = nbformat.read(f, as_version=4)
ep = ExecutePreprocessor(timeout=600, kernel_name='python3')
ep.preprocess(nb, {'metadata': {'path': './'}})
```
This will execute the notebook and save the results. It’s pretty handy for automating workflows. You might wanna check out the official `nbconvert` docs for more details.
Also, if you’re into automation, `papermill` is another solid option. It’s designed for parameterizing and running notebooks, so it might fit your use case better.
Hope this helps!
