watex.utils.coreutils.is_erp_dataframe#

watex.utils.coreutils.is_erp_dataframe(data, dipolelength=None, force=False, verbose=0.0)[source]#

Ckeck whether the dataframe contains the electrical resistivity profiling (ERP) index properties.

DataFrame should be reordered to fit the order of index properties. Anyway it should he dataframe filled by 0. where the property is missing. However, if station property is not given. station` property should be set by using the dipolelength default value equals to 10..

Parameters:
  • data (Dataframe object) –

    Dataframe object. The columns dataframe should match the property ERP property object such as ``[‘station’,’resistivity’,

    ’longitude’,’latitude’]``

    or ['station','resistivity', 'easting','northing'].

  • dipolelength (float) – Distance of dipole during the whole survey line. If the station is not given as data columns, the station location should be computed and filled the station columns using the default value of the dipole. The default value is set to 10 meters.

  • force (bool, default=False,) – If Vertical electrical (VES) is passed while expecting ERP data, force set to True will consider the VES data as ERP data and will use only the resistivity values in VES data. This will will an invalid results especially when parameters computation are needed.

  • verbose (int,) – Show the verbosity; outputs more messages if True.

Return type:

A new data with index properties.

Raises:
  • - None of the column matches the property indexes.

  • - Find duplicated values in the given data header.

Examples

>>> import numpy as np
>>> from watex.utils.coreutils import is_erp_dataframe
>>> df = pd.read_csv ('data/erp/testunsafedata.csv')
>>> df.columns
... Index(['x', 'stations', 'resapprho', 'NORTH'], dtype='object')
>>> df = _is_erp_dataframe (df)
>>> df.columns
... Index(['station', 'easting', 'northing', 'resistivity'], dtype='object')