Numpy an External Library
Discover how to use the NumPy library to efficiently store and manipulate data with arrays, including one- and two-dimensional arrays. Learn key functions such as calculating dot products, generating random numbers, sampling data with or without replacement, and shuffling arrays. Understand how to set a random seed for reproducible results, all foundational skills for data analysis in Python.
Handling arrays with NumPy #
Single dimensional arrays #
For the sake of simplicity, you can think of Numpy as a fast and efficient library for storing and manipulating data - usually through array data structures (which are similar to Python lists). You can find all the documentation for Numpy here. Numpy arrays are different from standard Python lists in many ways; notably, they are faster, take up less space, and have more functionality. It is important to note, though, that these arrays are of a fixed size and type that you define at creation. You cannot ...