nunique#

swordfish.function.nunique()#

If X is a vector/array vector, return the number of unique elements in X.

If X is a tuple, elements of each vector at the same position forms a key, and this function returns the number of unique keys.

Parameters:
  • X (Constant) – A vector/array vector or a tuple composed of multiple vectors with same length.

  • ignoreNull (Constant, optional) – A Boolean value. If set to true, only non-null elements will be included in the calculation. The default value is false. Note that if X is a tuple or array vector, ignoreNull must be set to false.