无法在 GCP 中使用 Papermill 从一个 jupyter notebook (.ipynb) 调用函数到另一个 (.ipynb)

时间:2021-01-13 06:57:49

标签: python python-3.x google-cloud-platform jupyter-notebook papermill

我正在 GCP 中尝试 Papermill。我需要从 Jupyter Notebook-2(test_integration) 调用 Jupyter Notebook-1 (call_test) 中的特定函数

我无法这样做,任何人都可以帮助我如何去做。下面找到代码

Jupyter Notebook-2 (test_integration):

client = bigquery.Client()

sql = """SELECT * FROM `abc`"""
Master = client.query(sql).to_dataframe()

Master.to_csv("testing_1.csv")

%run ./call_test.ipynb

a= add_test(Master)

a.to_csv('testing_2.csv')

Jupyter Notebook-1 (call_test):

 def add_test(Master):
     return(Master)

错误:

    "add_test" not defined

0 个答案:

没有答案
相关问题