Saulo Ricci
Saulo Ricci

Reputation: 774

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

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.

Upvotes: 2

Views: 1294

Answers (1)

Anthonios Partheniou
Anthonios Partheniou

Reputation: 1709

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.

Upvotes: 5

Related Questions