error: how to deal with TypeError: NDFrame.to_csv() 'line_terminator' with Python snippet
Hello,
I’m having some issues with the python snippet node.
I’m using KNIME 5.2.0 and Windows 10…
My python snippet node can’t seem to get data out even if no operation is run (pyOut = kIn.copy()). The input data, even without modification from Python, get an error message:
ERROR Python Snippet 4:56 Execute failed: Error in processing: Traceback (most recent call last):
File “[path on my computer]vK1w03analyze7294712537195621547.py”, line 85, in
writecsv(r"[path on my computer]vK1w03pyOutpython2knime10228499832868678158.csv",pyOut)
File “[path on my computer]vK1w03analyze7294712537195621547.py”, line 79, in write_csv
pyOut.tocsv(f, header=False, dateformat=‘%Y-%m-%dT%H:%M:%S.%f’, line_terminator = ‘\r ’, escapechar = “\”, doublequote=False, quoting=csv.QUOTE_NONNUMERIC)
TypeError: NDFrame.tocsv() got an unexpected keyword argument ‘lineterminator’
Here is the “raw” data and the workflow.
The script I wrote initially works in python but it’s irrelevant because even a lack of operation causes the error. I have found some basic information about Panda and CSV writing in python but this does not help my case since it’s linked to the node.
Is this a bug? Is this caused by my data?
Any help would be greatly appreciated.