The .str accessor
What it is
Applies vectorised string operations over a column: .str.strip(), .str.lower(), .str.len(), .str.contains(), .str.startswith().
Why it matters
It is the vectorised path. The alternative — apply(lambda s: s.lower()) — is a Python-level loop for no benefit.
In the real world: Lower-casing and trimming 2 million email addresses at once so duplicate customers can be found.
df["email"].str.lower().str.strip()
df["note"].str.len()
df[df["sku"].str.startswith("SKU", na=False)].str on a column that is not actually strings returns NaN for every non-string element, silently, rather than raising.
Practise it: Pull the Month Out of a Timestamp, Tidy Up Column Names