Getting started with Python Libraries

Rashini Gamalath
CodeX
Published in
4 min readApr 4, 2022
Subpng

In this tutorial, I will discuss python libraries in general and some commonly used libraries.

What is a Library?

In the world of programming, we use the term library to mean a similar thing to what we talk about the day-to-day life as Library.

In programming, the library means the collection of pre-complied codes that can be used in the programs that we write. A library may also contain documentation, configuration data, message templates, classes, and values, among other things.

What is a Python Library?

Python library is a collection of related modules.

Module?

A module is a set of lines of code written for a specific purpose.

It contains code bundles that can be reused in a variety of programs. It simplifies and facilitates Python programming for developers. Because we won’t have to write the same code for different programs. Machine learning, data science, data visualization, and other industries rely heavily on Python libraries. The libraries and modules are essentially shared resources.

Let’s have a look at a simple scenario. Let’s say we need to find the square of an integer in Python. In Python, how would we handle this situation?

We have three different ways.

  1. By multiplying numbers two times.

2. By using Exponent Operator (**).

3. Using built-in ‘math’ module in python.

In that scenario, you should first use the reserved keyword ‘import’ to import the module ‘math.’ Then, as part of the math module, you can use the ‘pow’ function. You won’t have to write the algorithm for computing the square of the integer this way.

This is only a simple illustration. There are numerous other functions in the math module that make calculations much easier. Then there a plenty of different Python libraries and modules to choose from.

Python Standard Library

Built-in modules of Python’s standard library enable access to basic system functions such as inputs and outputs, network access, and so on. The standard library contains over 200 core modules that enable quick access to the Python environment’s most important features.

All the capabilities supplied by the standard library help to make Python a high-level language. We don’t require in-depth details of what happens at each action to use high-level language. A high-level language provides the programmer with a handy and easy-to-use interface for completing the desired activity.

Common Python Libraries

Now let’s look at some commonly used python libraries for graphical user interface development. Those libraries make python such a powerful tool as well.

  1. Tkinter

It is popular for developing desktop applications.

2. PyQT5

CleanPNG

It is a visual framework that allows you to drag and drop GUI elements such as Buttons, Labels, and Text Boxes.

3. Numpy

PNGitem

The name “Numpy” stands for “Numerical Python”. It’s a well-known machine-learning library that can handle big matrices and multi-dimensional data.

4. SciPy

pngset

The name “SciPy” stands for “Scientific Python”. It’s a high-level scientific computation package that’s open-source. It’s developed on top of a Numpy extension. It uses Numpy to perform complex calculations.

5. Matplotlib

Jan Meppe

The charting of numerical data is the responsibility of this library. It’s for this reason that it’s employed in data analysis. It’s also an open-source library.

6. Pandas

KindPNG

For data scientists, Pandas is a crucial library. It’s an open-source machine learning package with a variety of analysis tools and configurable high-level data structures. It simplifies data analysis, processing, and cleansing.

And also, Sci-kit Learn and Tensorflow are the only two common libraries that support Machine Learning and Deep Learning.

This is all about the python Libraries. I hope you gained some new knowledge.

Thank you very much. Happy coding!

--

--

Rashini Gamalath
CodeX
Writer for

Undergraduate of University of Moratuwa, Faculty of Information Technology.