Drills tagged with this skill, unpassed first. Pass them all to mark the skill ready for scenarios.
email column has inconsistent entries — stray spaces and mixed casing — so the same address looks different across rows.
Your task. Write normalize_emails(df) that returns the email column as a Series, with surrounding whitespace stripped and every value lowercased.
Example. " Alice@MAIL.com " → "alice@mail.com".
Notes. Return a Series, not a DataFrame. Already-clean values pass through unchanged.phone column has numbers written with all kinds of separators — hyphens and spaces — and you need them as plain digit strings.
Your task. Write clean_phone_numbers(df) that returns the phone column as a Series with every hyphen (-) and space removed.
Example. "98-765 43210" → "9876543210".
Notes. Return a Series. Remove both hyphens and spaces. Values with no separators pass through unchanged.label column mixes free text with a four-digit year somewhere inside each value. You want just the year.
Your task. Write extract_year(df) that returns a Series with the first four-digit number pulled out of each label.
Example. "Report 2021" → "2021", "Q3 2022 update" → "2022".
Notes. Return a Series of strings. If a label has more than one number, take the first match. Every label contains at least one four-digit run.