Machine Learning Python

Why is Python the most popular language for Data Science

Pinterest LinkedIn Tumblr

Python Logo

The joy of coding Python should be in seeing short, concise, readable classes that express a lot of action in a small amount of clear code — not in reams of trivial code that bores the reader to death.

Guido van Rossum

In today’s tutorial, we will work you through a brief introduction into what Python is about, what you can do with it and why it’s so popular now. We will also explore why it’s the preferable language for Data Science, and lastly how to install it on your machine.

What is Python?

Python is a multi-purpose language with a beginner-friendly and straightforward syntax. It’s been around for over 23 years (2021), and the way it has grown until now is incredible, and certainly there have been new features released and developed.

It’s one of the fastest-growing and most popular programming languages used for scientific computing. Due to its simplicity, the language has grown more than any other programming language compared to JavaScript, Java, and C#. Even people from different backgrounds who are not software engineers, but mathematicians, statisticians, medical students, accountants, and people from other disciplines use Python for various tasks.

What can you do with it?

Some things you can do with Python are as follows:

  • Build Artificial Intelligence Applications (includes fields such as natural language processing, computer vision, machine learning, robotics, and more)
  • Perform Automation. Instead of doing a repetitive task, you could easily make a script to automate the process
  • Build Web Applications (like Instagram), Mobile Applications, and Desktop Applications
  • Performing Data Analysis
  • Perform Software Testing
  • Doing Ethical hacking and more

Why is it so popular?

If you are recently getting started with the language, which I believe is how you found this tutorial, you might ask yourself “Why is the language so popular?”. Well, here are some of my reasons.

  • High-level: It’s a high-level language, so you don’t have to worry too much about complex tasks such as memory management. Indeed, the ones familiar with the low-level programming language such as C, C++ developers can testify.
  • Cross-platform: You can smoothly run any Python application if you use either a Linux, Mac, or Windows Machine.
  • Huge Community: The community is vast, which is a benefit, so whenever you get stuck or find yourself looking for a solution, there is someone out there to help.
  • Large Ecosystem: It has a large ecosystem of built in libraries and packages, so whenever you want to develop an application for a purpose, someone has already made it for you.

Even in most job posts, you will see knowing Python is beneficial.

Why use Python for Data Science

Different packages that exist in anaconda

One aspect that proves Python is the right choice while building your machine learning project is its abundance of libraries and frameworks that facilitate the development process and cut development time.

As you have seen in previous tutorials, using:

  • NumPy: used for scientific computation
  • Pandas: For data preprocessing
  • Scikit-learn: Is a free machine learning library for Python
  • Matplotlib: Mainly consists of tools for basic plotting such as lines, bars, pies, scatter plots, and so on

And other libraries such as Scipy, TensorFlow, PyTorch, Keras, etc. which will be talked about in much details in the upcoming tutorials.

Python Installation with Anaconda

When installing Python, a recommended option is to use the Anaconda Python package manager freely available online for download. I suggest using Anaconda because it’s easy to work with and manage Jupyter notebook, Python, and other packages used for scientific computing.

Different versions of anaconda

Once downloaded, to install the Anaconda Python software on your system and ensure you have sufficient administrative privileges, then:

  • Double click the downloaded file
  • Adhere to the setup wizard

Trust me. The installation isn’t complicated. It’s quick and straightforward. It’s certainly shouldn’t take you more than 15 minutes and about a little more than 1 GB of space on your hard drive.

Currently, now there are multiple ways you can choose to execute your Python Scripts which you developed.

You could either choose to run the script directly on your browser using:

  • Jupyter Notebook: This is a web application that allows you to run live code, embed visualizations, and explanatory text all in one place. However, I strongly suggest you install Anaconda since the Jupyter Notebook comes with it.
Jupyter notebook labview

The other option if you choose not to install Anaconda locally on your machine is to run it directly on:

  • Google Colaboratory: A free online cloud-based Jupyter notebook environment allows us to train our machine learning and deep learning models on CPUs, GPUs, and TPUs.
Google Colab Live Script.
Google colab logo.

Conclusion

In this post, you discovered the welcoming introduction to Python. You will learn what Python is about, what you can do with it, why it’s popular and a common choice when building machine learning project and finally how to install it locally.

Do you have any questions about Python or this post? Leave a comment and ask your question. I’ll do my best to answer.

To get access to the source codes used in all of the tutorials, leave your email address in any of the page’s subscription forms.

Further Reading

We have listed some useful resources below if you thirst for more reading.

Articles

Books

To be notified when this next blog post goes live, be sure to enter your email address in the form!

4 Comments

  1. The way you broke down this topic is quite pleasing to me. Thank you very much.

Write A Comment