NumPy


NumPy is a Python library used for data science and numerical computing with statistics. It is open source and commonly used in other data science libraries in Python, such as Pandas, SciPy, Matplotlib, scikit-learn, and scikit-image.

To install the NumPy library, install onto your version of Python from command line using the following command:

                
                    
                        
                        pip install numpy
                    
                
            

To import the NumPy library into your scripts, use the following code to have access to it as a reference:

                
                    
                
            

NumPy uses a multidimensional array (has to be of all the same datatype) as its main object, which is a table of elements (usually numbers), indexed by a tuple of non-negative integers. This differs from Python lists in that lists can contain items of different data types in the list, while the items in arrays used by the NumPy library must be of the same type. These dimensions are referred to as axes in NumPy. [1]

The benefit of these arrays is that they can be sliced, indexed, and iterated over either a portion or the entirety of the array. What this allows for is robust data manipulation and the ability for the programmer to transform the data in multiple different variations and produce a wide variety of end results. [2]

Source: [1] NumPy - QuickStart
Source: [2] Geeks for Geeks - Python NumPy