Skip to main content

equals

The equals (=) match filter returns rows that are an exact match to the specified value.

Syntax#

columnName = valuecolumnName == value
  • columnName - the column the filter will search for the matching value.
  • value - the value to match on.

Examples#

The following example returns rows where Color is blue.

from deephaven.TableTools import newTable, stringCol, intColfrom deephaven.conversion_utils import NULL_INT
source = newTable(    stringCol("Letter", "A", "C", "F", "B", "E", "D", "A"),    intCol("Number", NULL_INT, 2, 1, NULL_INT, 4, 5, 3),    stringCol("Color", "red", "blue", "orange", "purple", "yellow", "pink", "blue"),    intCol("Code", 12, 13, 11, NULL_INT, 16, 14, NULL_INT),)
result = source.where("Color = `blue`")

The following example returns rows where Color is blue and Code is 14.

from deephaven.TableTools import newTable, stringCol, intColfrom deephaven.conversion_utils import NULL_INT
source = newTable(    stringCol("Letter", "A", "C", "F", "B", "E", "D", "A"),    intCol("Number", NULL_INT, 2, 1, NULL_INT, 4, 5, 3),    stringCol("Color", "red", "blue", "orange", "purple", "yellow", "pink", "blue"),    intCol("Code", 12, 14, 11, NULL_INT, 16, 14, NULL_INT),)
result = source.where("Color = `blue`", "Code = 14" )

The following example returns rows where Color is blue or Code is 14.

from deephaven.TableTools import newTable, stringCol, intColfrom deephaven.conversion_utils import NULL_INT
source = newTable(    stringCol("Letter", "A", "C", "F", "B", "E", "D", "A"),    intCol("Number", NULL_INT, 2, 1, NULL_INT, 4, 5, 3),    stringCol("Color", "red", "blue", "orange", "purple", "yellow", "pink", "blue"),    intCol("Code", 12, 14, 11, NULL_INT, 16, 14, NULL_INT),)
result = source.whereOneOf("Color = `blue`", "Code = 14")

Related documentation#