ValueError: cannot convert float NaN to integer

Hi,

why is the Python script node returning error, while the python code says it executed successfully, how do i fix it

Is there an alternative solution with any other nodes for if then else condition to manipulate the value of more than 1 column.