Skip to main content
Version: Python

containsNonFinite

containsNonFinite returns a boolean value indicating whether or not the specified value is non-normal, where normal is defined as not null, not infinite, and not NaN.

Syntax

containsNonFinite(value)

Parameters

ParameterTypeDescription
valueUnion[double, float]

The value to check.

Returns

true if the value parameter is not normal; false otherwise.

Examples

The following example shows how containsNonFinite interacts with various objects within a table.

from deephaven import new_table
from deephaven.column import double_col
from deephaven.constants import NULL_DOUBLE

source = new_table(
[
double_col("AllNulls", [NULL_DOUBLE, NULL_DOUBLE]),
double_col("AllNonNulls", [0.0, 0.1]),
double_col("SomeNulls", [0.0, NULL_DOUBLE]),
]
)

result = source.update(
formulas=[
"AllNullsResult = containsNonFinite(AllNulls_)",
"AllNonNullsResult = containsNonFinite(AllNonNulls_)",
"SomeNullsResult = containsNonFinite(SomeNulls_)",
]
)