A function to facilitate loading well log data, in las or dlis format, as dataframe.
Project description
log2frame
import log2frame
A function to read well log data in LAS, LIS and DLIS formats and extract curves data as DataFrame.
The curves and header data are stored in an instance of Log class, designed to hold this data and operate with it. It provides convenient access to metadata like well name, UWI, and curve units (via .units or the safer .units_dict()).
If multiple log files are read together, the Log instances are packed in a Pack instance, designed to hold Log instances and operate with them.
unit-aware mode
When simpandas is installed, log2frame can preserve curve units and index units through the use_simpandas option.
log2frame.read(path, use_simpandas=False)returns plain pandas-backedLoginstances.log2frame.read(path, use_simpandas=True)usessimpandas.SimDataFramewhen available.- If
use_simpandasis omitted, the package defaults to the installedsimpandassetting.
to read log files
Simply call the function read() with the path or path pattern as argument:
a single log file
To load a single .las, .lis or .dlis file. The function will return a Log instance containing the data:
log2frame.read( path_to_file )
several files in a folder
To load several files at once. In this case the read() function will return a Pack instance containing a Log instance for each log file:
log2frame.read( path_to_folder_containing_files/*.* )By default, any invalid file will be ignored, thus, there is no problem to have other files in the same folder as the log files.
several files recursively
To read files recursively in subdirectories, use the appropriate fnmatch pattern:
log2frame.read( path_to_folder_containing_files/**/*.* )
further examples and details
Please refer to the Jupyter notebook log2frame_demo for further examples and details on how to use log2frame.
The sample data is publicly available at NLOG.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file log2frame-0.2.2.tar.gz.
File metadata
- Download URL: log2frame-0.2.2.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
935d0458ac92556bdfd3260b01d51a335c9073ba516a8f7b6163605c8bc69e5f
|
|
| MD5 |
77e61f3c488345790c74350480475ff7
|
|
| BLAKE2b-256 |
92838e21fd92736dd0dcf23b3161f1ce9aefea103764df14990ad9a35a574cf6
|
File details
Details for the file log2frame-0.2.2-py3-none-any.whl.
File metadata
- Download URL: log2frame-0.2.2-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c27ade788074e3a8c92b66620b56ef580379d830626cf2e9ee1afb2a34d48cd8
|
|
| MD5 |
09aa5587323ce3a134ab3c6b105ca218
|
|
| BLAKE2b-256 |
c51c0f5888170ed327ec283e6d4db9bf7d6e238bb9daae28bd43dc32ee210128
|