pygmi.bholes.iodefs#

Import borehole data, currently supports Council for Geoscience data.

Classes#

ImportData

Import borehole data.

Functions#

rename_or_create(df, old_name, new_name[, default_value])

Rename or create a column if it does not exist.

get_CGS(lithfile, headerfile, boreholeid)

Borehole Import.

Module Contents#

class pygmi.bholes.iodefs.ImportData(parent=None)#

Bases: pygmi.misc.BasicModule

Import borehole data.

Parameters:

parent – Reference to the parent routine. The default is None.

setupui()#

Set up UI.

settings(nodialog=False)#

Entry point into item.

Parameters:

nodialog (bool, optional) – Run settings without a dialog. The default is False.

Returns:

True if successful, False otherwise.

Return type:

bool

saveproj()#

Save project data from class.

cmb_settext(obj, list_a)#

Set the text in a combobox.

fillcombos()#

Load in data and fill combo boxes.

get_headfile()#

Get the header filename.

get_lithfile()#

Get the lithology filename.

pygmi.bholes.iodefs.rename_or_create(df, old_name, new_name, default_value=None)#

Rename or create a column if it does not exist.

Parameters:
  • df (Pandas DataFrame) – Input dataframe

  • old_name (str) – Old column name

  • new_name (str) – New column name

  • default_value (any, optional) – Default value for new column, by default None

Returns:

df – Output dataframe.

Return type:

Pandas DataFrame

pygmi.bholes.iodefs.get_CGS(lithfile, headerfile, boreholeid)#

Borehole Import.

Parameters:
  • lithfile (str) – Filename to import.

  • headerfile (str) – Filename to import. Filename to import.

  • boreholeid (str) – Column to merge on.

Returns:

df – Pandas dataframe with borehole information.

Return type:

Pandas DataFrame