Dark theme

Why Python?


There are a wide variety of programming languages you might learn, so why learn Python?

People often become very strong advocates for languages they like: the language R has an almost cult-like following at the moment (as does Python), but you'll also find strong communities wedded to the joys of Fortran (especially amongst older scientists and those trained by them), C++/Java, MATLAB, and Ruby, along with a host of more obscure languages. Equally, those who work in specific areas will often try to convince you to learn languages useful for one particular area: the .Net languages (for Windows), PHP or Perl (for web servers), or Javascript (for webpages).

Given all this, why Python?


We've chosen Python for this course for the following reasons:

1) First off, all the latest reports from the job market are that Python is rapidly becoming one of the most popular of the modern languages asked for by employers, after the (much harder to learn) C-languages (including Java) (TIOBE Programming Community Index; see also links at: Measuring programming language popularity). More specifically, it is probably the most popular language for data analysts and analytical scientists. This is because...

2) It has a massive community behind it, developing a vast number of libraries that work with it (libraries are code other people write that you can integrate into your code). At the last count, there were over 100,000 pieces of software and libraries listed at PyPI, the official repository. Many of these are centred on data analysis.

3) Python is relatively easy to learn. It is well written for beginners, hiding some of the complications that were exposed to coders in older languages. It is also well founded on modern coding philosophy, meaning that good programming practice is encouraged.

4) Although it is relatively simple to learn, Python also has hidden depths. One of the traditional issues with languages like Python is that while they are easy to learn, the complications of computing were hidden away, meaning that learning simple languages didn't teach you much about computer programming in general or how other languages work; it was also hard to build anything very powerful because you only had access to the simplest aspects of computing. Python, however, makes these details available, meaning that it is possible to learn a lot about modern computing while learning it, and to build powerful software using it. One of the things that makes you a fully fledged programmer is the ability to pick up other languages easily; Python will help you learn to do this. This is in clear distinction to R, for example. As a data analyst, you should definitely become familar with R (here's a nice infographic comparing it with Python) but R is not a fully-fledged programming language; learning R will teach you very little that is transferable to other languages.


In short, these aspects make Python the language of choice for data analysts: it is easy to write, well set up for data analysis, with a wide variety of excellent data analysis libraries, and is still a powerful language with good access to the details of computing.

Overall, Python represents a language that is at a high enough level that you can build robust and professional scientific software from it, while still being simple enough to use that you won't spend too much time gibbering under your desk. Learning it (in detail) will also teach you a great deal about how computers work and give you a very solid foundation for picking up other computer languages.