A column of a table is an array underneath: thousands of values of one type, worked on all at once. This module takes the survey’s plot areas, harvests and prices as NumPy arrays and does without loops what Python Essentials did with them: converting square meters to hectares, computing yields, picking out the irrigated rice plots with a mask, and averaging prices across provinces or across months, with a month missing.
What you do
Section titled “What you do”- Creating arrays; dtype and shape
- Indexing, slicing and boolean masks
- Vectorized arithmetic and broadcasting
- Aggregating along an axis; NaN
The module’s notebooks
Section titled “The module’s notebooks”- 10_arrays.pyArrays with NumPyRead itCompanion · 8 exercises
The notebooks are in your course folder; here you can read them without running anything. For reference in any module: primer: marimo and the python this course assumes and primer: pandas 2 to 3 and glossary.