How to execute a python notebook inside another on

2019-05-30 15:23发布

I'd like to execute a python notebook I'had created to data pre-processing inside another notebook related with data classification process. So the last notebook depends on the functions and execution provided by the first notebook.

How could I do that at google cloud datalab environment? I do like to reuse the functions and variables used at the pre-processing notebook on the classification notebook.

Thanks.

1条回答
The star\"
2楼-- · 2019-05-30 15:53

The following should work:

myNotebook = <relative path to notebook>

%run $myNotebook

or simply

%run <relative path to notebook>

Note: This does not work if you are running Datalab on Google Cloud Platform.

查看更多
登录 后发表回答