geost.base.BoreholeCollection.get_cumulative_layer_thickness#
- BoreholeCollection.get_cumulative_layer_thickness(column: str, values: str | List[str], include_in_header: bool = False)[source]#
Get the cumulative thickness of layers where a column contains a specified search value or values.
- Parameters:
column (str) – Name of column that must contain the search value or values.
values (str | List[str]) – Search value or values in the column to find the cumulative thickness for.
include_in_header (bool, optional) – If True, include the result in the header table of the collection. In this case, the method does not return a DataFrame. The default is False.
- Returns:
Borehole ids and cumulative thickness of selected layers if the “include_in_header” option is set to False.
- Return type:
pd.DataFrame
Examples
Get the cumulative thickness of the layers with lithology “K” in the column “lith” use:
>>> boreholes.get_cumulative_layer_thickness("lith", "K")
Or get the cumulative thickness for multiple selection values. In this case, a Pandas DataFrame is returned with a column per selection value containing the cumulative thicknesses:
>>> boreholes.get_cumulative_layer_thickness("lith", ["K", "Z"])
To include the result in the header object of the collection, use the “include_in_header” option:
>>> boreholes.get_cumulative_layer_thickness("lith", ["K"], include_in_header=True)