isNull

Syntax

isNull(X)

Details

Returns true if an element is NULL. Starting from version 2.00.5, when X is a dictionary, tuple, array vector, or table, this function checks whether each element in each row is NULL and returns a dictionary, tuple, or table with the same dimensions as X.

Note:

Both DolphinDBisNull and pandas.isnull can be used to determine whether a value is null. The differences are as follows:

  • DolphinDB isNull is designed for detecting NULL values within DolphinDB's own type system and supports scalars, vectors, matrices, and other DolphinDB objects.

  • pandas.isnull is intended for missing-value detection in Python data analysis workflows. It primarily identifies values such as NaN, NaT, pd.NA, and None.

Parameters

X is a scalar, pair, vector, matrix, or memory table.

Returns

Returns a Boolean value with the same form as X.

Examples

isNull(00i);
// output: true

isNull(1 NULL NULL 6 NULL 7);
// output: [false,true,true,false,true,false]

isNull(1/0);
// output: 1

x=1 NULL 5 NULL 4 6$2:3;
x;
#0 #1 #2
1 5 4
6
isNull(x);
#0 #1 #2
0 0 0
1 1 0

Related functions: hasNull, nullFill