watex.utils.get_xs_xr_splits#
- watex.utils.get_xs_xr_splits(data, /, z_range=None, zname=None, section_indexes=None)[source]#
Split data into matrix \(X_s\) with sample \(ms\) (unwanted data ) and \(X_r\) of samples :math:`m_r`( valid aquifer data )
- Parameters
data (pandas dataframe) – Dataframe for compressing.
zname (str,int ,) – the name of depth column. ‘name’ needs to be supplied when section_indexes is not provided.
z_range (tuple (float),) – Section [‘upper’, ‘lower’] of the aquifer at different depth. The range of the depth must a pair values and could not be greater than the maximum depth of the well.
section_indexes (tuple or list of int) – list of a pair tuple or list of integers. It is be the the valid sections( upper and lower ) indexes of of the aquifer. If the depth range z_range and zname are supplied, section_indexes can be None. Note that the last indix is considered as the last position, the bottom of the section therefore, its value is included in the data.
- Returns
- xs (list of pandas dataframe) –
shrinking part of data for compressing. Note that it is on list
because if dataframe corresponds to the non-valid dataframe sections.
- xr (pandas dataframe) –
valid data reflecting to the aquifer part or including the
aquifer data.
Example
>>> from watex.datasets import load_hlogs >>> from watex.utils.hydroutils import get_xs_xr_splits >>> data = load_hlogs ().frame >>> xs, xr = get_xs_xr_splits (data, 3.11, section_indexes = (17, 20 ) )