Top Python Libraries

These are the top Python libraries that I use for my projects.

Mahbuba Shahrin
Python in Plain English

--

Photo by Mitchell Luo on Unsplash

Table of Contents

1. Python Definition

2. Python Libraries

3. Top 8 Python Libraries

From Python.org

Python Definition

Python is an all-purpose, adaptable, and robust programming language. It’s a fantastic language for novices because it’s brief and feasible to read. Python can do anything for example, data science, machine learning, or web development. Python is used mostly to build websites and software, automation, and perform data analysis. Moreover, it can also be used for game development, desktop GUI, artificial intelligence, business applications, CAD Applications, Web Scraping Applications, and much more. Some of the Python IDE are IDLE, PyCharm from JetBrains, Spyder, PyDev, Atom, Thonny, Wing IDE, eric, Jupyter Notebook, Eclipse +PyDev, Vim, Nano, and Microsoft Visual Studio with Python extension. The Python Platforms are Linux, Cross-platform software, macOS, and Microsoft Windows.

Python Libraries

Python Libraries are a collection of valuable tasks that remove the requirement for composing codes from scratch; basically, a set of precompiled codes that can be utilized later in a program for some specific precise operations. There are more than 137,000 python libraries. It portrays a crucial part in the development of data science, data visualization, image and data manipulation applications, machine learning, and more. The usage of libraries are crucial because it will always be available to make the job easier instead of the need for writing the code again and again will be unnecessary. A Python Library contains the some of the following:

· Classes

· Configuration data

· Documentation

· Message Templates

· Values

Top Python Libraries Alphabetized

· BeautifulSoup

· Flask

· Matplotlib

· NumPy

· Pandas

· Pillow

· Requests

· TensorFlow

BeautifulSoup

BeautifulSoup is a HTML or XML Parser. It is an important Python Library for Data Science. This library which is used in Python for pulling out or withdrawing information from websites such as web-scraping. Web scraping is a technique that lets us use programming to gather data from a website and output it in the format that we need it in. Code needs to be written in order to send request to the server that’s hosting the page that we want. The server will then return the source code that we had requested in HTML by extracting the data. Make sure to find out if Web Scraping is legal for the website being used as well as if permission are granted by the website owner/company. If we are using Web Scraping for couple of hundreds of pages then the procedure can get very expensive for the website owner. Something to think about are:

· It’s important to request permission to use the website.

· If the data has already been downloaded then keep a copy and do not redo the same page again and again.

· Try not to send too many requests to the server.

One can use the command below to download BeautifulSoup:

Sudo apt-get install python3-bs4

or

Pip install beautifulsoup4

BeautifulSoup can be used to parse an HTML page. We can import the library and create an instance for the BeautifulSoup class to parse the document.

Flask

Flask is a lightweight Web Server Gateway Interface web application framework; a Python module that lets you develop web applications easily. Flask has a small and broadened core which is a microframework that doesn’t include an Object Relational Manager. Features include URL routing and template engine.

Matplotlit

From matplotlib.org

Matplotlib is for dimensional plotting, a cross-platform, data visualization and graphical plotting library for Python and its numerical extension NumPy. It is an open-source library in Python which is widely used for publication of quality figures in a variety of hard copy formats and interactive environments across platforms. It is also an open source alternative to MATLAB. It can be used for designing charts, graphs, pie charts, scatterplots, histograms, error charts, etc. Matplotlib stands for MATLAB-like Plotting Library. Basically, it is a library to produce high quality and interactive two dimensional plots.

NumPy

NumPy is used for working with arrays and has functions for working in domain of linear algebra, fourier transform, and matrices. NumPy which stands for Numerical Python that is consisted of multidimensional array objects and a set of routines for processing those arrays. NumPy is written in Python and C. When it comes to scientific computing, NumPy is one of the fundamental packages for Python providing support for large multidimensional arrays and matrices along with a collection of high-level mathematical functions to execute these functions swiftly.

Pandas

Pandas is an open source, BSD licensed library which can enable the provision of easy data structure and quicker data analysis for Python. For operations like data analysis and modeling, Pandas makes it possible to carry these out without needing to switch to more domain-specific language like R. Please read my article about Pandas in the link below:

Pandas in Data Analysis

Pillow

From pypi.org

Pillow is a PIL which is Python Imaging Library; it provides vast file format support for manipulating, opening, and saving images. Write support is intentionally restricted to the most commonly used interchange and presentation formats. It is available for MacOS, Windows, and Linux. PIL adds in a lot of image processing features to Python and Pillow is a fork of PIL that sums up end user features.

Please select the link below to check out my article of a more thorough explanation of PIL here.

Requests

Requests 2.28.0 can be installed using:

pip install requests

Requests is the Python HTTP for Humans. Requests allows you to send HTTP/1.1 requests at ease. There are many downloads of requests by users, about more than a million repositories and 30 million downloads per week according to pypi.org.

Please select the link for my article about the Python Request Library to learn more about the content.

TensorFlow

TensorFlow is an open-source software library for high performance numerical computation; it is a popular deep learning framework. It’s used for machine learning as well as deep learning algorithms. It was created by Google’s Brain team and to this day it is used by many data scientist, physicists, and other researchers for complicated mathematical data processing.

These are the eight Python libraries that are my favorite and that I had used so far. I will be using more as my experience widens for more knowledge.

More content at PlainEnglish.io. Sign up for our free weekly newsletter. Follow us on Twitter and LinkedIn. Check out our Community Discord and join our Talent Collective.

--

--