geost.bro.regis.RegisUnits.select_description_contains#
- RegisUnits.select_description_contains(substring: str | list[str], case_sensitive: bool = False) RegisUnits[source]#
Select metadata by a substring for a partial description or descriptions.
- Parameters:
substring (str | list[str]) – Substring or list of substrings to match within the descriptions.
case_sensitive (bool, optional) – Whether the match should be case-sensitive, by default False.
- Returns:
class – RegisUnits instance containing the metadata subset for the selected units.
- Return type:
~geost.bro.regis.RegisUnits
- Raises:
MissingUnitError – Raised if none of the specified substrings are present in the metadata.
Examples
Select units from REGIS II that contain a specific substring:
>>> regis_meta = geost.bro.regis_units() >>> selected_meta = regis_meta.select_description_contains("Formatie van Oosterhout") # Select a single substring >>> selected_meta = regis_meta.select_description_contains( ... ["Formatie van Oosterhout", "Formatie van Breda"] ... ) # Select multiple substrings