COMP9321 · 03 Joining data · Lists & facts

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

10 Terms

1
New cards
Concatenate vs merge: when each?
Concatenate: same columns, more rows (Jan + Feb sales). Merge/join: different columns about the same entity, by a key (Orders + Customers).
2
New cards
Orders has C001, C002, C003; Customers has C001, C002, C004. Keys after inner · left (Orders) · right · outer join?
Inner: C001, C002. Left: C001, C002, C003 (C003 profile NaN). Right: C001, C002, C004. Outer: C001–C004.
3
New cards
Three join traps Haibo stressed.
Duplicate keys multiply rows (dedupe first); mismatched key formats ("C001" vs "c001 ") silently drop matches (standardise keys); check the row count after every join.
4
New cards
Anti-patterns of wrangling (from the deck).
Dropping missing values without analysis; joining before deduplicating; long one-line chained transformations; ignoring the index (slow look-ups).
5
New cards
to_numeric(errors='raise') vs errors='coerce'?
raise: stop with an error on a bad value. coerce: turn bad values into NaN ('12a' → NaN).
6
New cards
Grouping by Publisher AND Place shows what?
Each publisher–place combination as its own group.
7
New cards
Why set or sort an index?
Faster look-ups and joins on that key.
8
New cards
Feature engineering checklist (five steps).
Derive meaningful variables; encode categories (one-hot / ordinal); scale for distance-based models; log-transform skewed values; remove leakage and IDs.
9
New cards
Which models need scaling and which don't?
Need it: k-NN, k-means, regularised (ridge/lasso) and gradient-based models. Trees and random forests don't.
10
New cards
pandas merge with differently named keys and clashing column names?
pd.merge(left, right, left_on='lkey', right_on='rkey', suffixes=('_l', '_r')).