Error with pandas in the Labs Python Integration

Hi all,

I am trying to run a script using the Labs Python Integration node and I encounter an error that does not happen when I execute the code in pure Python.

Code:

# the column last is Local Date in KNIME
dfc[fd_revw] = 3
dfc['expected'] = dfc['last'] + pd.to_timedelta(dfc['estimate'] * 365, unit='D')

I get the following exception:

Executing the Python script failed: Traceback (most recent call last):
  File "<string>", line 18, in <module>
  File "C:\Users\md45qh\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\ops\common.py", line 69, in new_method
    return method(self, other)
  File "C:\Users\md45qh\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\arraylike.py", line 92, in __add__
    return self._arith_method(other, operator.add)
  File "C:\Users\md45qh\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\series.py", line 5526, in _arith_method
    result = ops.arithmetic_op(lvalues, rvalues, op)
  File "C:\Users\md45qh\AppData\Local\Programs\Python\Python37\lib\site-packages\pandas\core\ops\array_ops.py", line 218, in arithmetic_op
    res_values = op(left, right)
TypeError: unsupported operand type(s) for +: 'KnimePandasExensionArray' and 'TimedeltaArray'

Does anyone know what might be going on?

Another error, now when performing a Join using PyArrow, which also seems to be related to some KNIME specific data type.

This happens whenever I have a Local Date field in my data and I use this in the join by the way. When I remove these fields, the join run without problems. Looking at the data schema, it seems that Local Date fields get a this KNIME Logical Type as opposed to an actual data type (e.g. string):

image

@toscanomatheus could you give us an example where this happens that one might be able to reproduce? Is the error within the Python node or when trying to bring the data back to KNIME?