← NumPy & Pandas learning pathNumPy & Pandas · Module 2 of 10
NumPy operations
Index, slice and calculate with arrays.
📖 Key ideas
- Vectorised maths: arr * 2, arr + arr2.
- Indexing: arr[0], arr[-1]; slicing arr[1:4].
- 2D indexing: matrix[row, col].
- Aggregates: sum, mean, max, min, std, with axis=0 or 1.
- Broadcasting lets arrays of different shapes combine.
💡 Real-life example: Broadcasting is adding the same tip to every bill in a stack without writing a loop.
VectorisationOperating on whole arrays at once
BroadcastingCombining arrays of compatible shapes
axisDimension to aggregate along
Boolean maskArray of True/False to filter