pbPassingBI
/

Wrangling & cleaning — flashcards

One card per lesson — 4 in this module. Recall the key points, then check. 4 cards. Click a card to flip, or use the arrow keys and space bar.

  1. Handling missing values — what are the key points?

    mean() divides by the non-null count, not the row count · df.dropna() removes a row for a single missing value anywhere in it · Filling with 0 versus the median are different claims about the data Read the lesson

  2. Removing duplicates — what are the key points?

    keep=False marks every copy, which is what you want for inspection · Sort before drop_duplicates so the row you keep is deliberate · Normalise case and whitespace before deduplicating on text Read the lesson

  3. Text operations — what are the key points?

    All text methods go through the .str accessor · strip().lower() on keys prevents silent merge failures · str.contains needs na=False when the column has nulls Read the lesson

  4. Converting data types — what are the key points?

    astype is strict; to_numeric/to_datetime with errors="coerce" is forgiving · Always pass format= to to_datetime when you know the layout · Inspect the rows that coerced to NaN — they show what is dirty Read the lesson