Call us on 020 7112 8300
Call me back Get in touch

Why assurance teams should learn Python like they do excel

Last updated: Thursday November 12th 2020

What is Python?

Python is a general-purpose programming language which is notable for its relative readability and simplicity in comparison to other languages like Java and C++. As a tool, it has a gargantuan range of applications in the realms of data analytics, machine learning, statistical analysis and computer simulation. The reason for this being that it is essentially a tool that can create whatever one desires. Having to invent software from scratch sounds difficult but this can be made immeasurably easier due to the open-source code created by the community surrounding Python.

Is it easy to use?

It is generally much easier to learn than other programming languages like C++. This is for many reasons. It is object-oriented meaning it groups code together with the state the code modifies. It is procedural i.e. it groups code into functions. It is also logical in the sense that the code reads in an understandable and mathematical way. Unlike C++, Python automates a lot of the memory allocation meaning you do not have to tell the computer where you want to store a number in the memory. Even with all of this, Python is still difficult to learn. This is due more to the fact that there is so much to learn rather than it being difficult to comprehend.

There are a plethora of open-source libraries – which are packages of code containing premade functions and classes of objects – for just about everything. Many of these libraries are made by the community and can be implemented into your own program with one line of code. For example, the barebones version of python does not have the idea of a vector (which is a class) built in. By simply writing “import numpy”, one will now have the functions and classes to manipulate sets of data as if they were vectors, matrices or tensors. Even without any libraries, python can still be used to perform basic data analysis with lists of numbers, words, ordered or unordered. Other libraries include modules for statistics, simulation, graphing and modelling.

Python vs Excel

A very notable library for this article is ‘xlwings’. This module allows users to extract data from an excel document and perform processes on such data. One of the downfalls of Excel is its inability to perform advanced statistics and calculations which, via xlwings, can be done inside the domain of Python. This gives auditors the mechanisms to easily analyse certain anomalies in data structures which would otherwise not be possible in Excel. Due to the versatility of Python, this makes it an immensely powerful tool that can be combined with Excel for use in accounting and finance. Python also can be used to automate processes since it can run a series of commands with a few clicks.

It is worth mentioning another limitation to excel being that it cannot handle very large data sets. As a spreadsheet it has a capacity of 1,048,576 rows and 16,384 columns whereas python is nowhere near as limited in that regard. This cap on the size of data is known to sometimes cause serious problems down the line (for example the coronavirus data that was nearly lost by Public Health England in September 2020). Hence Python could be an even more efficient and safer apparatus for data analysis when used by itself.

Missing data

Programmers usually have a debugging tool. This is a piece of software that can automatically detect errors in the code and the data put into that code. It can even detect errors such as missing data that can otherwise go unnoticed in Excel. If the debugging tools are not enough, it is very possible and easy to write your own data checks to make sure your code is not making a critical error when manipulating a data set.

Summary

Overall, Python offers much more versatility in terms of how data can be structured, analysed and modelled. It can sufficiently automate many tasks. The only negative aspect of using Python in accounting is how much there is to learn. The common alternative is to use VBA on excel, which can be just as difficult to learn and still has many limitations. Additionally, Python has near unlimited potential for automation which can, in turn, be tailored to the data sets of some company to catch unique anomalies.

If you have any questions please contact us on 020 7112 8300 alternatively you can email info@assureuk.co.uk.