Problem with 'float' object is not iterable

Hello everyone :slight_smile:
I have a problem when I am using Python Script. I am receiving some data from API and when I want to print it inside of the Python Script data is there and I have no problems at all. But when I want to pass the data on to the next node I am getting error:

  • ERROR Python Script (1⇒1) 0:299:197 Execute failed: ‘float’ object is not iterable
    After some debugging I realised that I have no float objects at all.

    They are or type “object” or “bool”.
    Anyone else had problems like this? How did you solve the problem?

Kind regards,
Denis :smiley:

1 Like

I had some NaN values inside of the “object” and I did not know that by default they are type “float”.
Solved it using fillna() function.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.fillna.html

Kind regards, Denis

2 Likes

Glad to hear you got it worked out - and thanks for posting your solution! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.