Answers for "if not nan python statement"


python checking if something is equal to NaN

# Test to see if it is equal to itself
def isNaN(num):
    return num != num
Posted by: Guest on October-01-2020

how to check if a value is nan in python

# If you are doing any conditional operation and you want to check a if
# a single value is Null or not then you can use numpy's isna method.
Posted by: Guest on December-10-2021

Browse Popular Code Answers by Language