zcollection.meta.Dataset.select_variables_by_dims#

Dataset.select_variables_by_dims(dims, predicate=True)[source]#

Select variables that have at least one dimension in the given dimensions depending on the predicate.

Parameters:
  • dims (Sequence[str]) – A sequence of dimensions to select.

  • predicate (bool) – A boolean value that determines whether to select variables that have the given dimensions (True) or variables that don’t have the given dimensions (False).

Returns:

A set of variable names that have the given dimensions (if predicate is True) or don’t have the given dimensions (if predicate is False).

Return type:

set[str]