In this lesson, we will introduce the NumPy library in Python.
NumPy is a Python library for scientific computing. NumPy stand for Numerical Python. Here is the official description of the library from its website:
"NumPy is the fundamental package for scientific computing with Python. It contains among other things:
- a powerful N-dimensional array object
- sophisticated (broadcasting) functions
- tools for integrating C/C++ and Fortran code
- useful linear algebra, Fourier transform, and random number capabilities
Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases.
NumPy is licensed under the BSD license, enabling reuse with few restrictions."
NumPy is such an important Python library that there are other libraries (including pandas) that are built entirely on NumPy.
The main benefit of NumPy is that it allows for extremely fast data generation and handling. NumPy has its own built-in data structure called an
array which is similar to the normal Python
list, but can store and operate on data much more efficiently.
Advanced Python practitioners will spend much more time working with pandas than they spend working with NumPy. Still, given that pandas is built on NumPy, it is important to understand the most important aspects of the NumPy library.
Over the next several lessons, we will cover the following information about the NumPy library:
- NumPy Arrays
- NumPy Indexing and Assignment
- NumPy Methods and Operations
Let's move on to learning about NumPy arrays, the core data structure that every NumPy practitioner must be familiar with.