by Kim Desmond, CodingNomads
Python is an open-source, general purpose programming language widely used in data science, machine learning, web development, application development, automation scripts, Fintech and more. Developed by Guido van Rossum in the late 1980’s, Python’s popularity has recently surged.
StackOverflow named Python the fastest growing major programming language, and the language most developers want to learn. Codecademy saw a 34% increase in students studying Python in 2018. And as of 2014 in the United States, 80% of the top 10 university computer science (CS) departments (and 69% of the top 39) teach Python in introductory courses.
Growth of Python Queries in Stack Overflow
Image source: Stack Overflow
So why is Python so popular?
Because Python is:
- Easy to read, write and maintain, so developers ❤️ it
- Efficient for prototyping, so start-ups and entrepreneurs ❤️ it
- Highly scalable and powerful, so large companies like Google and Netflix ❤️ it
- Modular: can easily access and add libraries for specific functions, so data scientists & machine learning engineers ❤️ it
- An open source programming language with a robust community, so everyone ❤️’s it
What is Python used for?
If you’re considering learning Python, you might wonder, “What is Python used for,” “What can I do with Python,” and most importantly, “Why should I learn Python”?
This article discusses the top 5 Python uses: data science, web development, application development, automation scripts and finance / Fintech. We also give a list of honorable mention Python uses, and why so many people see value in learning this language.
Table of Contents
- Python for data science
- Python for web development
- Python for application development
- Python for automation scripts
- Python in Finance
- Other Python Uses
- Why Learn Python?
1. Python for data science
The first – and perhaps today’s most talked about use of Python – is in data science. Data science is the practice of extracting information and insight from data. In this case, data science includes machine learning, data visualization and data analysis.
Python for machine learning
Machine learning (ML) is an application of artificial intelligence (AI) where machines learn from programs without being explicitly programmed to do so. In essence, machine learning enables computers to program themselves. Examples of ML algorithms include:
- Recommender systems – for example, when Netflix or Youtube makes recommendations based on your watch history.
- Image recognition systems – for example, that can recognize whether an image is a cat or dog, the popular Not Hotdog app from the TV series Silicon Valley, or FaceID by Apple that recognizes you unlocks your phone.
Traditional Programming vs Machine Learning
Image source: CodingNomads
Why Python for machine learning
Since its early days, Python has been used for scientific and numerical computing. Because machine learning is mainly numerical computation, Python is extremely useful for ML.
Especially with the introduction of Tensorflow, the largest end-to-end ML platform developed by Google, Python has become the de-facto language for ML applications. Pytorch, another deep learning platform started by Facebook, is also gaining popularity.
Additionally, Python comes with scikit-learn, a simple and easy to use ML package that can get you started very easily in Machine Learning. You can see the increase of popularity in these ML platforms in the graph below.
Growth of Python Machine Learning Libraries
Image source: Stack Overflow Trends
Python for data visualization and data analysis
With the rapid growth of the Internet, we are creating more data than ever. A recent report by DOMO states that over 2.5 quintillion bytes of data are created every single day! That is a lot of data, and if used wisely, can help businesses make effective decisions.
Data visualization is an easy way to look at large amounts of data and understand the patterns in the data. An interesting example of how data visualization can help people better understand data is the below chart drawn by Florence Nightingale about the causes of death in the hospital during the Crimean War. Rather than just showing a table with numbers, visually depicting the data makes it more meaningful and impactful.
Data Visualization Created by Florence Nightingale
Image source: Deloitte
In data analysis, you use the visualizations of data, along with other parameters like mean, median and mode, to understand the data and make decisions based on it.
Understanding and presenting data to drive business decisions can save significant costs. For example, Netflix uses data visualizations to understand what factors help subscribers stay subscribed. By incorporating these findings into their personalization and recommendation engines, Netflix saves $1B per year!
Visualizations using seaborn
Image source: Python Graph Gallery
2. Python for web development
Web development includes all the activities used to create websites and web-based software applications. There are two parts to every website – the client side, which runs code on the internet browser of a user’s computer; and the server side, where the code runs on the web server.
Python has two major server side frameworks – Django and Flask (which is a micro-framework). Python also has inbuilt modules that help deal with JSON, sockets, http-requests and more, making the process of web development seamless.
3. Python for application development
Since Python is written to have lower development time and effort, it is great for prototyping. Because of its robustness, scalability, speed, and versatility, Python is also great for enterprise-scale projects. iDataLabs found that 69% of companies that use Python are small (<$50M in revenue), 9% are medium-sized ($50M – $1000M in revenue) and 16% are large (>$1000M in revenue).
Python also comes with a database API, which allows easy connection to databases like MySQL, Oracle, PostgreSQL, MS SQL Server, etc. Python’s interfacing to languages like C and Java via Cython and Jython also allows developers to easily bring functionality from other languages into a Python application.
Python comes with PyPi, a huge collection of Python packages that can be used to quickly implement any functionality that you may need in your project. Thus, building a large application in Python is similar to using legos to create a new structure! Use the blocks carefully and join them together in the right way to create your masterpiece today. Can’t find a package you need? Because Python is open source, you can create a new package that solves your problem and share it with the world!
Image source: Real Python
4. Python for automation scripts
Perhaps the biggest use case for Python is in scripting. Scripting means writing small programs that perform a certain task automatically. Python is ideal for this as it was invented to be quick and easy to write. The book Automate the Boring Stuff with Python, by Al Sweigart, teaches you to create simple scripts with Python to perform tasks that would take you hours if done manually.
Another example of a script is web scraping – parsing a website and extracting relevant information out of it. Libraries like Selenium and BeautifulSoup make it super easy to parse through a web page and capture the relevant information. Then this information can be stored in a format like CSV, which can then be fed into a machine learning algorithm to make any awesome predictions or recommendations that you seek.
For example, you can use Python to scrape the National Weather Service website to get the weather data for San Francisco, which you can then feed into a machine learning algorithm to predict the weather. So cool!
Image source: Dataquest
5. Python in Finance
Financial technology (fintech) is technology that automates and improves the delivery and use of financial services – from your online banking portal to blockchain applications. Fintech is used across sectors such as investment and portfolio management, banking, education, and fundraising. According to HackerRank’s 2018 Developer Skills Report, Python is among the top three most popular languages used in financial services companies, and the top language in FinTech.
Image Source: Hackerrank
Fintech requires applications that are robust, secure, compliant, and easy-to-use. To give you an idea of the market size and opportunity, in 2018 $112 billion was invested into companies that are innovating in the fintech space.
Python, with its ease of use, modularity and mathematical base, fits right into fintech. Python modules like pyalgotrade (for algorithm trading), scipy (for scientific computing) and quantecon.py (for quantitative economics) provide solid building blocks for developing fintech applications.
Python is also ideal for fintech because of its machine learning and data science libraries and capabilities. For example, using machine learning to automatically detect fraud using payment history could potentially save a company millions of dollars. It is no wonder that companies like Stripe, Robinhood and Revolut use Python in their software development.
Other Python Uses
The 5 Python uses in this article may be the most popular, but they only scratch the surface of the various applications for Python. The below graphic depicts the many industries that use Python. Also listed below are just a few more of the popular Python uses today.
To see the full list of Python applications, you can head on over to the official Python website, which also has multiple examples for each of these categories.
- Game development
- GUI applications
- Embedded applications (Python works with Raspberry Pi)
Python Queries by Industry
Image source: StackOverflow
Why Learn Python
Given the explosion of Python uses, there are many reasons why learning Python is a great investment of your time. Not only is Python extremely versatile and useful, it’s in high demand for jobs, earns great salaries, and more. For our top 6 reasons why we think Python is a great programming language to learn, check out our blog – Why Learn Python.
If you think Python is a language you’d enjoy learning and using, schedule a chat with one of our mentors to learn how to start learning Python for free today.
READ NEXT: 6 Reasons to Learn Python Now