Educational Cards
Learn from video content, text, and interactive tasks
Filters
Counting and accumulating per key
Most analytics questions have the same shape: split the rows into groups by some key, then reduce...
Ranking, ties, and toward groupby
You usually want the result ranked . Sorting by a tuple key gives multi-level ordering, and a...
Project paths and feature pipelines
The same instinct produces small utilities that keep a project tidy. A recurring nuisance is file...
Transpose and the ragged-row pitfalls
A close cousin of column iteration is the transpose , which turns rows into columns by swapping the...
Type hints and a numeric helper
As projects grow, functions become the way you organise them. A function with type hints states its...
Why loops first, and the length pitfall
Every operation here is a Python-level loop that pays a small cost for each element. On three...
Matrices: indexing, row and column sums
Real data is usually two-dimensional: a grid of rows and columns. A spreadsheet, a feature table, a...
Parsing rows and the bool('False') trap
Now combine the two ideas: a function that turns one raw row of strings into properly typed values....
Measurement scales and your first function
Everything read from a CSV is a string, so before you can compute you must parse each value into...
Print, input, and turning text into numbers
Python is the language most data scientists reach for first, and like any language you begin by...
Lists as vectors: scaling and the dot product
A column of numbers — prices, scores, temperatures — is a vector , and in plain Python a vector is...
Creating, slicing, and selecting arrays
Everything you did with lists and nested loops now collapses into one fast, typed object: the NumPy...