0% found this document useful (0 votes)
213 views7 pages

Batch Variable Unit Assignment Using Python Script in Techlog

The document describes using a Python script to batch assign variable units in Techlog by reading from a CSV file. The script checks if the current unit is NULL, directly changes the unit if so, or converts the units if they are compatible. Running the script involves opening the CSV file, running the script in Techlog, specifying the CSV file path, filtering wells/datasets, and running the script. Caution is given around specifying empty units as NULL.

Uploaded by

c_b_umashankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
213 views7 pages

Batch Variable Unit Assignment Using Python Script in Techlog

The document describes using a Python script to batch assign variable units in Techlog by reading from a CSV file. The script checks if the current unit is NULL, directly changes the unit if so, or converts the units if they are compatible. Running the script involves opening the CSV file, running the script in Techlog, specifying the CSV file path, filtering wells/datasets, and running the script. Caution is given around specifying empty units as NULL.

Uploaded by

c_b_umashankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Batch variable unit assignment using python script in Techlog

Contents

• Problem Statement
Introduction
• Solution
Solution
• Workflow
Workflow
• Limitation
Result
Introduction

• Techlog data harmonization tool may be used to change/convert units for variables
• However, for the case of multiple variable unit assignment, the workflow can be simplified by
using python scripts
• The python script reads an input CSV file and batch changes/converts the variable units in the
project
Solution

• The python script takes an input of a .csv file with the input fields: Variable, Unit_before and
Unit_after
• The following steps are carried out by the script:
• Read the CSV file
• Check if the Unit_before is NULL, change the unit directly
• Check if Unit_before and Unit_after are compatible and convert the units if required
Workflow

1. Open the .csv file and enter the fields Variable, Unit_before and Unit_after

2. Open the script within Techlog


3. Enter the file path to the .csv file

4. Filter the wells and datasets of interest


5. Run the script from the launch button
Caution!

• The variable units that are empty need to be specified as NULL


• Once changed, the units cannot be reassigned to empty using the python script
Result

Before After
Well 1 Well 1

Well 2 Well 2

Well 3 Well 3

You might also like