Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 10:58 AM
Got it. So the only way to "pass a parameter" with %run is to define it as a variable in the parent notebook and use that variable in the child notebook. This works because both notebooks are executed in the same session so the variable my_var is available in both notebooks.
Parent Notebook:
my_var = "this is a parameter I want to pass"
%run ./my_child_notebookChild Notebook:
print(my_var)
>> "this is a parameter I want to pass"