nimble.calculate.proportionMissing

nimble.calculate.proportionMissing(values)

The proportion of values in the vector that are missing.

Calculate proportion of entries in ‘values’ iterator that are are None or NaN.

Parameters:

values (nimble Base object) – Must be one-dimensional.

Examples

>>> lst = [1, 2, float('nan'), 4, float('nan')]
>>> vector = nimble.data(lst)
>>> proportionMissing(vector)
0.4