Unable to read data from table in Jupyter in to KNIME Python script

I’m using the Python script module in KNIME. I have a Pandas dataframe generated in the end. I’m able to run the notebook from KNIME using the Python module but can’t import that dataset to output_table.

How can I use that dataframe (generated using Jupyter) in KNIME Python script? I get the following error:

I tried output_table = df_final_final.copy()
also output_table = df_final_final


You probably want nb.df_final_final if the table is inside the notebook.

1 Like

I’ve tried that too but it says that file doesn’t have the attribute!

Is the notebook cell that produces df_final_final tagged “export”? If not, you need to remove the only_include_tag option in your call to load_notebook (line 4 in the screenshot) or, alternatively, add the tag to the relevant cell(s).

When I do that, it sayf “df_final_final” is not recorgnized. How do I “tag” cells in Jupyter for export?

And using np.df_final_final instead of only df_final_final still does not make a difference?
Could you upload your knime.log file? It contains some more information about the error, which could help in finding the underlying problem.

In order to tag notebook cells in Jupyter, you first need to unhide the tag toolbar via View > Cell Toolbar > Tags. You can then type the desired tag into the text box above each cell and click Add tag.

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