如何在google cloud datalab中执行另一个python笔记本 [英] How to execute a python notebook inside another one at google cloud datalab

查看:90
本文介绍了如何在google cloud datalab中执行另一个python笔记本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想执行一个我创建的python笔记本,用于与数据分类过程相关的另一个笔记本内的数据预处理。所以最后一个笔记本取决于第一个笔记本提供的功能和执行。

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.

谢谢。

推荐答案

以下内容应该有效:

myNotebook = <relative path to notebook>

%run $myNotebook

或只是

%run <relative path to notebook>

注意:如果您运行的是 Google Cloud Platform上的Datalab

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

这篇关于如何在google cloud datalab中执行另一个python笔记本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆