Back to Community
How to judge Nan?

For example:
my python code is:
if(price is Nan):

the IDE show me the error: "Error Runtime exception: NameError: global name 'Nan' is not defined".
I want to know how to indicate the Nan? How to charge judge whether the price is Nan or not?
Thank you very much.

2 responses

something like this?

if context.stock in data:  
   #into these statements if there are valid data points  
    # code for missing data points  

if you have multiple securities you can use the same code and just loop through to check each