NumPy: Zero to Hero
GitHub: https://github.com/hasan-firat-data-and-business-analyst/Data-Science-Python/blob/main/NumPy.py
What is NumPy ?
NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.
Data Structures
The main data structure in NumPy is the ndarray, which is a shorthand name for N-dimensional array. When working with NumPy, data in an ndarray is simply referred to as an array. It is a fixed-sized array in memory that contains data of the same type, such as integers or floating point values.
Data Types in Python
By default Python have these data types:
- strings — used to represent text data, the text is given under quote marks. e.g. “ABCD”
- integer — used to represent integer numbers. e.g. -1, -2, -3
- float — used to represent real numbers. e.g. 1.2, 42.42
- boolean — used to represent True or False.