Skip to content

MissingPosition Source

Bases: Enum

Place of missing values in a sort, whatever the order.

Added in version 0.1.0

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([20.0, None, 10.0])
prices.sort(ndp.ArraySorting(missing=ndp.MissingPosition.FIRST))
# Array([nan, 10., 20.], dtype=FLOAT64)

Attributes

FIRST = auto() Source

Missing values come before every other value.

Added in version 0.1.0

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([20.0, None, 10.0])
prices.sort(ndp.ArraySorting(missing=ndp.MissingPosition.FIRST))
# Array([nan, 10., 20.], dtype=FLOAT64)

LAST = auto() Source

Missing values come after every other value, as in pandas. Default value.

Added in version 0.1.0

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([20.0, None, 10.0])
prices.sort(ndp.ArraySorting(missing=ndp.MissingPosition.LAST))
# Array([10., 20., nan], dtype=FLOAT64)