NumPy Arrays
A NumPy
array is similar to a list but differs in some ways. In the life of a data scientist, reading and manipulating an array is of prime importance, and it is also the most frequently encountered task. These arrays could be a one-dimensional list, a multi-dimensional table, or a matrix full of numbers and can be used for a variety of mathematical calculations.
An array could be filled with integers, floating-point numbers, Booleans, strings, or even mixed types. However, in the majority of cases, numeric data types are predominant. Some example scenarios where you will need to handle numeric arrays are as follows:
- To read a list of phone numbers and postal codes and extract a certain pattern
- To create a matrix with random numbers to run a Monte Carlo simulation on a statistical process
- To scale and normalize a sales figure table, with lots of financial and transactional data
- To create a smaller table of key descriptive statistics (for example...