geotech.layer.split_at#
- DataFrame.geotech.layer.split_at(depth, reset_index=True)#
Split layers in the
DataFrameinto two with the provided depth.If the provided depth is found in between the
topandbottomcolumns of theDataFrame, then those particular layers would be split.The
topandbottomdepths of the affected layers are also adjusted to have continuity after splitting. However, columns other thantopandbottomare not modified. As such, it is recommended to split the layers before any depth-integrated calculations are done.This is particularly useful for cases where it is required or beneficial to split layers into two. For example, splitting a layer that is partly saturated and partly dry due to the groundwater level being found inside the layer.
- Parameters:
- depth: Series, float, int, or str
The depth/s where the layer would be split.
- reset_index: bool, default True
If True, resets the index after splitting.
- Returns:
DataFrameDataFrame with added and modified values for applicable layer splits. If no applicable splits are found, then the original DataFrame is returned instead.