geost.base.Collection.get#
- Collection.get(selection_values: str | Iterable, column: str = None) Collection[source]#
Select all survey data by selecting a subset of the header table of the Collection instance. Can be used to select surveys by ids directly or by information available in another column of the header table. Optionally, a different column than the survey ID column can be used.
- Parameters:
selection_values (str | Iterable) – Survey ID or IDs to select or values in another column of the header table to select.
column (str, optional) – If not selecting by survey IDs, in which column of the header to look for the selection values. The default is None, then the survey ID column is used.
- Returns:
New Collection instance containing only the selected surveys.
- Return type:
Examples
To select surveys with object IDs “obj1” and “obj2” from the collection, use:
>>> collection.get(["obj1", "obj2"])
Suppose we have a collection of boreholes that we have joined with geological map units using the method
get_area_labels(), which is then available information in the header table. We can use:>>> collection.get(["unit1", "unit2"], column="geological_unit")
which selects all surveys that are located in “unit1” and “unit2” geological map areas.