How to execute a python notebook inside another one at google cloud datalab

自古美人都是妖i 提交于 2019-12-08 03:18:58

问题


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 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.



来源:https://stackoverflow.com/questions/36814849/how-to-execute-a-python-notebook-inside-another-one-at-google-cloud-datalab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!