androidengineers.Book a session

Python 13 · Concurrency and data processing

Tabular data, arrays, and numerical-library concepts

articleSelf-paced

Learn the concept

AI projects often use table and array libraries. Learn the underlying operations first: select columns, filter rows, group records, aggregate values, and join datasets. Pandas and NumPy provide optimized tools for these tasks, but their convenience does not remove the need to understand shapes and missing values.

An array has a shape and a data type. Elementwise multiplication differs from a dot product. Broadcasting can align compatible shapes but can also produce a result with an unintended shape. Inspect dimensions before interpreting a numerical result.

A table transformation should define what happens to missing values and duplicate keys. Converting all missing entries to zero changes meaning when missing means unknown. The standard-library example below makes the operation explicit; later projects can implement the same contract with a numerical library in their own environment.

Run and inspect

rows = [{"team": "a", "minutes": 2}, {"team": "a", "minutes": 4}, {"team": "b", "minutes": None}]
groups = {}
for row in rows:
    if row["minutes"] is not None:
        groups.setdefault(row["team"], []).append(row["minutes"])
means = {key: sum(values) / len(values) for key, values in groups.items()}
assert means == {"a": 3.0}

Your exercise

Calculate per-team averages while retaining a separate missing-value count. Draw the shapes of two vectors and their dot-product result.

Check your understanding

Unknown measurements are not counted as zero, and you can explain the difference between a scalar, vector, and table.

YOUR LEARNING JOURNEY

0 of 42 available lessons completed

Progress saved in this browser. No account needed.
Tabular data, arrays, and numerical-library concepts | Python for AI Engineering | Android Engineers