nz

Replaces na with the replacement (default 0).

nz(x: any, replacement: any = 0) -> any

Parameters

Example

prev = nz(close[1], open)