Question about Python in Knime

Hey, i have a project in my school that i must creat a new python workflow with a random script we can choose. I integrated python in knime have a Conda Enviroment Propagation and a table creater node. Now i want show the data from table creater as bar visiualisation with python script how must the script looks like ?

import knime.scripting.io as knime
import pandas as pd
import matplotlib.pyplot as plt

table = knime.get_node(‘table_creator’)

data = table.to_dataframe()

“value_column” auf der y-Achse verwendest
data.plot(kind=‘bar’, x=‘column_name’, y=‘value_column’)

plt.show()

but i get an error like
Executing the Python script failed: Traceback (most recent call last):
File “”, line 7, in
AttributeError: module ‘knime.scripting.io’ has no attribute ‘get_node’

@Neiqi welcome to the KNIME forum. You could take a look at this video and example (KNIME & Python Graphics - Boxenplot Plotting large distributions - using the bundled Python integration (KNIME 4.6+) – KNIME Community Hub) how to integrate knime and python graphics:

More examples can be found here

3 Likes

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