@malik maybe you can take a look at this example how to transfer Sets between KNIME and Python and also put them to a similar use like you might have tried to do (comparing the ‘distance’ between string item sets):
Thanks for the quick reply!
My problem, however, is not with inputs but outputs via the knime.scripting.io API.
Here is a snippet of my Python code to output a table list created with the tabulate method in the Tabulate library. Sensitivity and Specificity are scalar values calculated from the confusion matrix cm.
The first three outputs worked fine; the last one did not. Python complained that I was not calling the DataFrame constructor properly. What did I do wrong?
@Bob_Nisbet can you provide a sample workflow that would reproduce the error without spelling any secrets. I cannot see where and how the “accuracy_table” is being created or what it contains.
The problem was with the pandas dataframe constructor. Most languages I know use explicit data typing, while Python data types are implied by the brackets. A scaler is just a list of one member. Therefore, I put square brackets around the scaler values to identify them as lists, and the pandas dataframe constructor worked!
It was a great help to interact with you. It made me think through the problem from another perspective, and that led to the solution. Thank you!