export_csv

petrophys.io.export_csv

export_csv(
well,
filepath,
curves=None,
include_depth=True,
null_value='',
units=True,
**kwargs,
)[source]

Export Well to CSV file.

With units, each column header carries its curve’s unit, GR (gAPI), and the depth column the well’s depth unit, DEPTH (m); read_csv() reads them back as names and units.

Parameters:
  • well (Well) – Well object to export

  • filepath (str or Path) – Output file path

  • curves (list of str, optional) – Specific curves to export (default: all)

  • include_depth (bool, optional) – Whether to include depth column (default: True)

  • null_value (str, optional) – String to use for null values (default: empty)

  • units (bool, optional) – Write headers as NAME (unit) for curves with a unit (default: True); False writes the bare curve names

  • **kwargs – Additional arguments passed to DataFrame.to_csv

Examples

>>> from petrophys.io import export_csv
>>> export_csv(well, "output.csv")