geost.base.Collection.get_cumulative_thickness#
- Collection.get_cumulative_thickness(column: str, values: str | list[str], include_in_header: bool = False) Series | None[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 anything (i.e. None). If False, a pandas.Series is returned. 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.Series or None
Examples
Get the cumulative thickness of the layers with lithology “K” in the column “lith” use:
>>> th = boreholes.get_cumulative_thickness("lith", "K") # Returns a pandas Series
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:
>>> th = boreholes.get_cumulative_thickness("lith", ["K", "Z"]) # Returns a pandas DataFrame
To include the result in the header object of the collection, use the “include_in_header” option:
>>> boreholes.get_cumulative_thickness("lith", ["K"], include_in_header=True) # Modifies the header and returns None