geost.base.BoreholeCollection.get#
- BoreholeCollection.get(selection_values: str | Iterable, column: str = 'nr')#
Get a subset of a collection through a string or iterable of object id(s). Optionally uses a different column than “nr” (the column with object ids).
- Parameters:
selection_values (str | Iterable) – Values to select
column (str, optional) – In which column of the header to look for selection values, by default “nr”
- Returns:
New instance of the current object containing only the selection resulting from application of this method. e.g. if you are calling this method from a Collection, you will get an instance of a Collection back.
- Return type:
New instance of the current object.
Examples
self.get([“obj1”, “obj2”]) will return a collection with only these objects.
Suppose we have a collection of boreholes that we have joined with geological map units using the method
get_area_labels()
. We have added this data to the header table in the column ‘geological_unit’. Using:self.get([“unit1”, “unit2”], column=”geological_unit”)
will return a
BoreholeCollection
with all boreholes that are located in “unit1” and “unit2” geological map areas.