How to execute Jupyter notebook


I was wondering about how to execute jupyter notebook in KNIME workflow.
Here is my example jupyter notebook code.

import pandas as pd
data = [[‘Choi’,22],[‘Kim’,48],[‘Joo’,32]]
df = pd.DataFrame(data, columns=[‘Name’,‘Age’])

And here is my code in Python Script node.

[Python Script node]
'# Path to the folder containing the notebook, e.g. the folder ‘data’ contained
'# in my workflow folder
notebook_directory = r"C:\Users\khhfh\OneDrive\바탕 화면\test"

'# Filename of the notebook
notebook_name = “python_test.ipynb”

'# Load the notebook as a Python module
my_notebook = knime_jupyter.load_notebook(notebook_directory, notebook_name)

I expected that when I loaded the ipynb file, then ‘result.csv’ would be created.
But nothing happend.

I’d appreciate it if you could tell me how to use ‘knime_jupyter’ library.


@hhkim you could check this example how to use KNIME and Jupyter. And also how to transfer files between them.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.