Why Python

Why Python

for Data Science, Machine Learning, Deep Learning and AI


Just enough Python

Summary : Understand why Python is the language of choice for Data Science, Machine Learning, Deep Learning and AI

Python is an easy to learn programming language. It is designed from the ground-up for readability, portability and easy of use. No wonder the data science and machine learning community has embraced it. There are multiple programming languages used in Data Science, like R, MATLAB, Julia, Scala etc. However, lately, almost all development is happening natively in Python. And most 3rd party libraries are created in Python first. Also, almost all data science or machine learning jobs almost always require you to know Python. No wonder, Python is the language of choice when somebody is beginning to learn Data Science of Machine Learning.

Contents

Top Programming Language

Check out this ranking from pypl that measures the popularity of a programming language based on how often language tutorials are searched on google. Python is way ahead of the pack.

PYPL Popularity of Programming Language based on Google Search

Also, specifically for Data Science and Machine learning, a popular website – KDNuggets has done a poll and found out that Python is getting ahead of other popular languages like R or packages like RapidMiner.

KDnuggets Analytics/Data Science 2018 Software Poll: top tools in 2018, and their share in the 2016-7 polls 

Python is powerful… and fast; plays well with others; runs everywhere; is friendly & easy to learn; is Open.

python.org/about/

You can also look at some of the quotes from companies on how Python made their lives easy. Since we are just beginning to understand Python, let’s not get ahead of ourselves in trying to understand all that.

Machine Learning with Python Salaries

The median salary for Machine Learning engineers in Python is $111K. That is just the median – If you are experienced enough, the sky is the limit. Look at the following snapshot from Payscale.

Python has extensive 3rd party libraries

Once again, if you are from a Java development background, you might contest this. Java is no slouch when it comes to 3rd party libraries. However, they are all limited to web development and other traditional software development areas. When it comes to Data Science, Maching learning and especially deep learning, Python outpaces all languages when it comes to native support for these. The list of top-grade libraries for Maching Learning and Deep Learning is matchless.

  • Deep Learning – keras, pytorch,tensorflow, theano etc.
  • Machine Learning – scikit learn, Caffe, Leaf,

The only other language that come this close is probably R.

Python is Developer Friendly

Python development is 3 to 5 time faster than other comparable languages. If you are interested, here is why Python makes the developer’s life easy

Python in Dynamically Typed

Unlike C, C++ or Java, Python is a dynamically typed language. Which means, you would not have to bother with the headache of trying to figure out the data type. That’s why in Python, you would never have to do a

String name = "Ajay Tech"

instead, you can just say

name = "Ajay Tech"

There are some advantages of static typing, but the easy of use with dynamic typing easily overrules the benefits of static typing.

Python is concise

There are very few traditional programming languages that are as concise as Python. For example, just to say “Hello World”, you would have to do this in Java.

public class Helloworld
{
    public static void main (String[] args)
    {
        System.out.println("Hello, world");
    }
}

whereas in Python, you can just say

print("Hello World)

Python is a glue language

When it comes to Data Science or Machine Learning, you would have to work with multiple 3rd party libraries. And Python is a very good glue language. It can connect multiple software components together very easily. For example, if a feature is already implemented in another programming language, say C or C++, it can just be used as-is without having to port it to Python.

Most people compare Python with other high level programming languages like Java and compare Python’s interpreter to Java’s JIT which is faster. Although there is merit to that comparison, in reality the facts are far different. For example, a very popular package for data manipulation is numpy. It is completely written in C, but just wrapped in Python. This makes it almost as fast as C to compute complex n-dimensional array manipulation that might take forever in Java or other high level programming languages.

There are some other examples of glue languages, but Python stands out among them in terms of its simplicity and popularity.

%d bloggers like this: