{"id":45318300,"url":"https://github.com/laslibs/las-py","last_synced_at":"2026-02-21T07:53:44.843Z","repository":{"id":45876664,"uuid":"205796472","full_name":"laslibs/las-py","owner":"laslibs","description":"Python library for parsing standard well log files (Geophysical well logs)","archived":false,"fork":false,"pushed_at":"2021-11-30T14:02:39.000Z","size":10,"stargazers_count":9,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-27T19:43:00.225Z","etag":null,"topics":["canadian","csv","las","parsing","python-library","well-logs"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/las-py","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laslibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-02T07:04:06.000Z","updated_at":"2024-01-08T20:23:41.000Z","dependencies_parsed_at":"2022-07-22T18:32:35.208Z","dependency_job_id":null,"html_url":"https://github.com/laslibs/las-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laslibs/las-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laslibs%2Flas-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laslibs%2Flas-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laslibs%2Flas-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laslibs%2Flas-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laslibs","download_url":"https://codeload.github.com/laslibs/las-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laslibs%2Flas-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29676856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T06:23:40.028Z","status":"ssl_error","status_checked_at":"2026-02-21T06:23:39.222Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canadian","csv","las","parsing","python-library","well-logs"],"created_at":"2026-02-21T07:53:44.321Z","updated_at":"2026-02-21T07:53:44.838Z","avatar_url":"https://github.com/laslibs.png","language":"Python","readme":"# Las-py\n\n## las-py is a zero-dependency Python library for parsing .Las file (Geophysical/Canadian well log files).\n\n## Currently supports only version 2.0 of [LAS Specification](https://www.cwls.org/wp-content/uploads/2017/02/Las2_Update_Feb2017.pdf). For more information about this format, see the Canadian Well Logging Society [product page](https://www.cwls.org/products/)\n\n- What's new in 1.1.0\n\n  - Export to csv\n  - Export to csv without rows containing null values\n  - Bug fixes\n\n- To Install\n\n\n    ```sh\n        $pip install las-py\n    ```\n\n- Usage\n\n\n    ```python\n        from las_py import Laspy\n     ```\n    ```python\n        my_las = Laspy('path_to_las_file.las')\n    ```\n\n- Read data\n\n\n    ```python\n       data = my_las.data\n       print(data)\n       #[[2650.0, 177.825, -999.25, -999.25], [2650.5, 182.5, -999.25,-999.25], [2651.0,180.162, -999.25, -999.25], [2651.5, 177.825, -999.25, -999.25], [2652.0, 177.825, -999.25, -999.25] ...]\n    ```\n    ```python\n        # get data with rows that has null value stripped\n       data = my_las.data_stripped\n       print(data)\n       #[[2657.5, 212.002, 0.16665, 1951.74597], [2658.0, 201.44, 0.1966, 1788.50696], [2658.5, 204.314, 0.21004, 1723.21204], [2659.0, 212.075, 0.22888, 1638.328], [2659.5, 243.536, 0.22439, 1657.91699]...]\n    ```\n\n- Get the log headers\n\n\n    ```python\n        headers = my_las.header\n        print(headers)\n        # ['DEPTH', 'GR', 'NPHI', 'RHOB']\n    ```\n\n- Get the log headers descriptions\n\n\n    ```python\n        hds_and_desc = my_las.header_and_descr\n        print(hds_and_desc)\n        # {DEPTH': 'DEPTH', 'GR': 'Gamma Ray', 'NPHI': 'Neutron Porosity','RHOB': 'Bulk density'}\n    ```\n\n- Get a particular column, say Gamma Ray log\n\n\n    ```python\n        GR = my_las.column('GR')\n        print(GR)\n        # [-999.25, -999.25, -999.25, -999.25, -999.25, 122.03, 123.14, ...]\n    ```\n    ```python\n        # get column with null values stripped\n        GR = my_las.column_stripped('GR')\n        print(GR)\n        # [61.61, 59.99, 54.02, 50.87, 54.68, 64.39, 77.96, ...]\n    ```\n    \u003e Note this returns the column, after all the data has been stripped off their null values, which means that valid data in a particular column would be stripped off if there is another column that has a null value at that particular row\n\n- Get the Well Parameters\n\n  ### Presents a way of accessing the details individual well parameters.\n\n  ### The details include the following:\n\n        1. descr - Description/ Full name of the well parameter\n        2. units - Its unit measurements\n        3. value - Value\n\n  ```python\n    start = my_las.well.STRT.value # 1670.0\n    stop = my_las.well.STOP.value #  1669.75\n    null_value = my_las.well.NULL.value #  -999.25\n    # Any other well parameter present in the file, canbe gotten with the same syntax above\n  ```\n\n- Get the Curve Parameters\n\n  ### Presents a way of accessing the details individual log columns.\n\n  ### The details include the following:\n\n        1. descr - Description/ Full name of the log column\n        2. units - Unit of the log column measurements\n        3. value - API value of the log column\n\n  ```python\n    NPHI = my_las.curve.NPHI.descr # 'Neutron Porosity'\n    RHOB = my_las.curve.RHOB.descr # 'Bulk density'\n    # This is the same for all log column present in the file\n  ```\n\n- Get the Parameters of the well\n\n  ### The details include the following:\n\n        1. descr - Description/ Full name of the log column\n        2. units - Unit of the log column measurements\n        3. value - API value of the log column\n\n  ```python\n    BHT = my_las.param.BHT.descr # 'BOTTOM HOLE TEMPERATURE'\n    BHT_valaue = my_las.param.BHT.value # 35.5\n    BHT_units = my_las.param.BHT.units # 'DEGC'\n    # This is the same for all well parameters present in the file\n  ```\n\n- Get the number of rows and columns\n\n\n    ```python\n        rows = my_las.row_count # 4\n        columns = my_las.column_count # 3081\n    ```\n\n- Get the version and wrap\n\n\n    ```python\n        version = my_las.version # '2.0'\n        wrap = my_las.wrap # 'YES'\n    ```\n\n- Get other information\n\n  ```python\n      other = my_las.other\n      print(other)\n      # Note: The logging tools became stuck at 625 metres causing the data\n      # between 625 metres and 615 metres to be invalid.\n  ```\n\n- Export to CSV\n\n  ### This writes a csv file to the current working directory, with headers of the well and data section only.\n\n  ```python\n      my_las.to_csv('result')\n      # result.csv has been created Successfully!\n  ```\n\n  \u003e result.csv\n\n  | DEPT | RHOB    | GR      | NPHI  |\n  | ---- | ------- | ------- | ----- |\n  | 0.5  | -999.25 | -999.25 | -0.08 |\n  | 1.0  | -999.25 | -999.25 | -0.08 |\n  | 1.5  | -999.25 | -999.25 | -0.04 |\n  | ...  | ...     | ...     | ...   |\n  | 1.3  | -999.25 | -999.25 | -0.08 |\n\n  Or get the version of csv with null values stripped\n\n  ```python\n      my_las.to_csv_stripped('clean')\n      # clean.csv has been created Successfully!\n  ```\n\n  \u003e clean.csv\n\n  | DEPT | RHOB  | GR   | NPHI  |\n  | ---- | ----- | ---- | ----- |\n  | 80.5 | 2.771 | 18.6 | -6.08 |\n  | 81.0 | 2.761 | 17.4 | -6.0  |\n  | 81.5 | 2.752 | 16.4 | -5.96 |\n  | ...  | ...   | ...  | ...   |\n  | 80.5 | 2.762 | 16.2 | -5.06 |\n\n- ## Support\n  las-py is an MIT-licensed open source project. You can help it grow by becoming a sponsor/supporter. Donate on [Patreon](https://www.patreon.com/bePatron?u=19152008)\n","funding_links":["https://www.patreon.com/bePatron?u=19152008"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaslibs%2Flas-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaslibs%2Flas-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaslibs%2Flas-py/lists"}