def is_missing(data, missing_value):
 if (is_float(data) and isnan(missing_value)):
  return isnan(data)
 elif (is_datetime(data) and isnat(missing_value)):
  return isnat(data)
 return (data == missing_value)

def is_missing ( data , missing_value ) : if ( is_float ( data ) and isnan ( missing_value ) ) : return isnan ( data ) elif ( is_datetime ( data ) and isnat ( missing_value ) ) : return isnat ( data ) return ( data == missing_value )
generic is_missing function that handles nan and nat .