Hi MagAmine –
Thanks for sharing that csv file – I tried using it and was able to find what I believe is the root cause of the problem: several numeric columns have no value present in that csv, which pandas.read_csv(...)
then turns into NaN
values – that’s just fine for a pandas DataFrame but when sending that data to KNIME as a json, there’s no support for NaN
in the json specification and so KNIME is unable to read the json data.
One immediate solution is to deal with these missing values in Python before passing data to KNIME. To oversimplify a bit, this adjustment to your example works when I tested it (note the use of fillna()
):
with knime.Workflow(workflow_path=workflow, workspace_path=workspace) as wf:
wf.data_table_inputs[0] = dataset.fillna(-1)
wf.save_after_execution = False
wf.execute()
Hope this helps.