Read and write Log ASCII Standard files with Python.
This is a Python 3.7+ package to read and write Log ASCII Standard
(LAS) files, used for borehole data such as geophysical, geological, or
petrophysical logs. It's compatible with versions 1.2 and 2.0 of the LAS file
specification, published by the Canadian Well Logging
Society. Support for LAS 3 is
being worked on.
Update re: use of LLMs Oct 2026: For ethical reasons, I'm not interested
in reviewing any submissions which have been prepared by an LLM, or prepared
with the assistance of an LLM. This covers both code and discussion in issues
or PRs. Humans only.
lasio is primarily for reading and writing data and metadata to and from
LAS files. It is designed to read as many LAS files as possible, including
those containing common errors and non-compliant formatting. It can be used
directly, but you may want to consider using some other packages, depending
on your priorities:
welly is a Python package that
uses lasio for I/O but provides a lot more functionality aimed at working
with curves, wells, and projects. I would recommend starting there in most
cases, to avoid re-inventing the wheel!
lascheck is focused on
checking whether your LAS file meets the specifications.
lasr is an R package which
is designed to read large amounts of data quickly from LAS files; this is
a great thing to check out if speed is a priority for you, as lasio is not
particularly fast.
LiDAR surveys are also called "LAS files", but they are quite different and
lasio will not help you -- check out laspy
instead.
lasio stopped
supporting Python 2.7 in August 2020. The final version of lasio with Python 2.7 support
is version 0.26.
You can also retrieve and load data as a pandas DataFrame, build LAS files
from scratch, write them back to disc, and export to Excel, amongst other
things.