Skip to main content

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-backed Log instances.
  • log2frame.read(path, use_simpandas=True) uses simpandas.SimDataFrame when available.
  • If use_simpandas is omitted, the package defaults to the installed simpandas setting.

to read log files

Simply call the function read() with the path or path pattern as argument:

to export / write LAS files

Use write_las() to export a Log back to a LAS file:

  • log2frame.write_las( log, path_to_file ) — writes LAS 2.0 by default
  • log2frame.write_las( log, path_to_file, version=1.2 ) — LAS 1.2
  • log.to_las( path_to_file ) — equivalent convenience method on Log

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.

Metadata

Release files for log2frame 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for log2frame 0.2.4
File Size Uploaded
log2frame-0.2.4.tar.gz 32.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for log2frame 0.2.4
File Interpreter ABI Platform
log2frame-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 65.1 kB

Release files / log2frame-0.2.4.tar.gz

Download URL log2frame-0.2.4.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
25ca8107f5fbf2a71c4d1cf0b78e96ca9585d2037cb4b315c029e5a0ce475390
BLAKE2b-256 checksum
How to use checksums
293ea0520aa168f84c6d9628a1c94833921ba7934460f213c2e0b96716c7def3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / log2frame-0.2.4-py3-none-any.whl

Download URL log2frame-0.2.4-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
633a1fa8c5dfc5746848d6de3207f650e8605aab3899c3a53477fd5c8a87a788
BLAKE2b-256 checksum
How to use checksums
0202e4246165a6d52cb311bf7e40c3a24b30429ead07edc173d066851824b8f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page