df["name"] = df["name"].str.strip().str.title()
df["email"] = df["email"].str.strip().str.lower()
df["country"] = df["country"].str.upper()
Anywhere you'd call a string method on one string, you call .str.method() on a column.
df["amount_text"] = df["amount_text"].str.replace(",", "")
df["amount"] = df["amount_text"].astype(float)
# Keep only digits
df["phone"] = df["phone"].str.replace(r"\D", "", regex=True)
# Strip parentheses and hyphens
df["phone"] = df["phone"].str.replace(r"[()\-\s]", "", regex=True)
# "Alice Smith" → first / last
df[["first", "last"]] = df["full_name"].str.split(" ", n=1, expand=True)
# pull domain from email
df["domain"] = df["email"].str.extract(r"@(.+)$")
df["phone"]
# "(415) 555-1212"
# " 415.555.1213 "
# "415-555-1214 ext.500"
df["phone_clean"] = (df["phone"].str.strip()
.str.replace(r"\D", "", regex=True)
.str[:10]) # keep first 10 digits
.str.method() applies any string method to a whole column.regex=True unlocks powerful pattern-based replacement..str.split(..., expand=True) splits one column into many.Given a column of messy emails, produce a clean lowercase column AND a new column containing just the domain.