Skip to content

NotEqual(value) Source

Bases: Rule

Keep the values different from a reference value.

Missing values are not kept: use IsMissing to test them.

Changed in version 0.2.0

Accepts an Array, each value being compared with the value at its position.

Version history (1)

Added in version 0.1.0

Parameters:

  • value (ScalarValue | Array)

    The reference value, a ScalarValue such as "Paris", 10 or True. Or an Array of the same shape as the tested values, one value per row for a Table column: each value is then compared with the value at its position, and a missing value of the Array matches nothing.

Raises:

Examples:

import numdaplot as ndp

countries = ndp.Array.from_list(["FR", "DE", "FR"])
countries.select(ndp.NotEqual("FR"))
# Array(['DE'], dtype=TEXT)