Skip to main content
πŸ”’ Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial β†’
⚑
← Coursesβ€ΊData Science AppliedModule 1 Β· Python for Data Β· Recapβ€ΊπŸŽ― Review: Data Science module 1 recapscenario21 / 104
+80 XP
Task
Build `clean_column(values, drop_na=True)` β€” the single most-used data-cleaning helper: - `values` is a list that may contain `None` entries (the pandas convention for missing). - `drop_na=True` (default) β†’ return new list with `None` removed, preserving original order. - `drop_na=False` β†’ return new list unchanged (callers may want imputation downstream). - Empty input β†’ empty list. - Don't mutate the input. This is what every data pipeline calls before fitting a model.
✏️ Write your code here
🐍
Loading Python...
One-time download (~1 MB). Then it runs instantly.
πŸ“Š Result
Press Run to see result...

πŸ’¬ Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…