nz

nz(value[, default])
Parameters
  • value (series or numeric) – Input value

  • value – Optional default value. 0 if default is not set.

Returns

series or numeric

If value is series, then function returns a series with the all nan values in the input series replaced with the default value. Otherwise, returns value if value is not nan or nil. Otherwise, returns default.

If default is series, the function will use the current value of default if needed.