How Python is used in Petronas and possibly in the O&G industry
08-25, 16:10–16:55 (Asia/Kuala_Lumpur), JC 1

Python has become a pivotal tool in the digital transformation journey of the oil and gas industry, particularly within PETRONAS. It is utilized for various applications in different businesses, such as upstream, gas, downstream, corporate, etc. ranging from data analysis to machine learning and automation. It is used by developers, programmers, analysts, engineers, and subject matter experts across the oil and gas value chain.

Python's flexibility and user-friendly nature render it an essential tool for managing complex data and executing detailed calculations, which are vital for informed decision-making. Python's ability to handle complex scientific computations, automate workflows, and integrate with various technologies, makes it an essential tool for the oil and gas industry.


Python's flexibility and user-friendly nature render it an essential tool for managing complex data and executing detailed calculations, which are vital for informed decision-making. Python's ability to handle complex scientific computations, automate workflows, and integrate with various technologies, makes it an essential tool for the oil and gas industry.

Some of the Python's applications in the oil and gas industry are:
Data analysis and visualisation: perhaps the first use of Python has been to process, analyse, and visualise large datasets obtained from various sources such as seismic surveys, drilling operations, production data, etc using libraries like Pandas, NumPy, SciPy, Matplotlib, Seaborn, and Plotly.
Machine learning and advanced analytics: machine learning models are important tools for understanding insights from data and making decision making in the oil and gas industry. Predicting equipment failures, energy optimization, scheduling maintenance proactively, forecasting operational KPIs, predicting reservoir properties, optimising portfolio, schedules, routes, and allocations, are examples of advanced analytics.
Automation and workflow optimization: Python's scripting and automation power used to automate repetitive tasks such as data entry, report generation, and process monitoring, which improves efficiency and reduces human error. Furthermore, it helps in integrating different systems and software used in the industry, creating seamless workflows and improving data accessibility. More and more platforms and systems have embedded Python interpreter for that purpose.
Process simulation and optimisation: Python (and Java) are used to build process simulation models that simulate the behaviour of systems and various processes under different scenarios. Examples are what-if analysis, scenario planning, optimize and improve process efficiencies in production operations.
Internet of Things (IoT) and Real-time Monitoring: Python is used to manage and process data from IoT sensors installed on rigs and pipelines for real-time monitoring. Python applications are also used to analyse streaming data in real-time to detect anomalies and optimize operations.

Dr Asaad is the Senior Manager of Data Science at PETRONAS Digital Sdn. Bhd. He has 21 years of experience in the oil and gas industry in Iran, the UK, and Malaysia, as a petroleum reservoir engineer, software engineer, data scientist, and AI/ML engineer.