geotech.layer.split_at#
- DataFrame.geotech.layer.split_at(depth, reset_index=True)#
Split layers in the
DataFrame
into two with the provided depth.If the provided depth is found in between the
top
andbottom
columns of theDataFrame
, then those particular layers would be split.The
top
andbottom
depths of the affected layers are also adjusted to have continuity after splitting. However, columns other thantop
andbottom
are 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:
DataFrame
DataFrame with added and modified values for applicable layer splits. If no applicable splits are found, then the original DataFrame is returned instead.