🌍 Data Science · flashcards

Data Science Data Wrangling and Exploration Flashcards

50 question-and-answer cards covering Data Wrangling and Exploration as it is examined in Data Science. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

50Cards in deck
24Free preview
33Syllabus topics
~240Chars per answer
FreePrice

24 sample cards from the Data Wrangling and Exploration deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. Give the formula for z-score standardization and the resulting distribution properties.

    $$x' = \frac{x - \mu}{\sigma}$$ The standardized feature has mean $0$ and standard deviation $1$. It does not bound values to a fixed range.

  2. When should you prefer standardization over min-max normalization?

    Prefer standardization when the data is roughly Gaussian or when algorithms assume zero-centered data (e.g., PCA, SVM, logistic/linear regression with regularization). Min-max is preferred when you need a bounded range and the distribution is non-Gaussian (e.g., image pixels, some neural nets).

  3. What is robust scaling and when is it useful?

    Robust scaling uses the median and IQR: $$x' = \frac{x - \text{median}}{IQR}$$ It is useful when the data contains outliers, since median and IQR are robust to extreme values unlike mean and standard deviation.

  4. What is feature engineering?

    Feature engineering is the process of creating, transforming, or selecting input variables (features) from raw data to improve model performance — e.g., deriving ratios, polynomial terms, interaction terms, binning, or domain-specific aggregates.

  5. What is binning (discretization) and name two strategies?

    Binning converts a continuous variable into discrete intervals/categories. Two strategies: equal-width binning (intervals of equal range) and equal-frequency (quantile) binning (each bin holds roughly the same number of observations).

  6. What is a log transformation used for in feature engineering, and what is a caveat?

    A log transform, $x' = \log(x)$, compresses right-skewed data and reduces the effect of large values, often making distributions more symmetric. Caveat: it is undefined for $x \leq 0$, so a shift like $\log(x+1)$ (log1p) is used for zeros.

  7. What is data aggregation, and give an example with a SQL clause.

    Aggregation summarizes multiple rows into single values using functions (SUM, AVG, COUNT, MIN, MAX) over groups. Example: SELECT region, SUM(sales) FROM orders GROUP BY region — collapses rows per region into total sales.

  8. What does a GROUP BY operation conceptually do, and what is the role of HAVING vs WHERE?

    GROUP BY partitions rows into groups by key columns so aggregates compute per group. WHERE filters rows before grouping; HAVING filters groups after aggregation (e.g., HAVING SUM(sales) > 1000).

  9. What is a pivot (or crosstab) operation in data aggregation?

    A pivot reshapes data from long to wide format, turning unique values of one column into new columns and aggregating a value column at each row-column intersection — e.g., months as columns, products as rows, with summed sales in cells.

  10. What is one-hot encoding and what dimensionality does it produce for a categorical feature with k levels?

    One-hot encoding represents each category as a binary indicator column (1 if present, else 0). A feature with $k$ categories produces $k$ binary columns (or $k-1$ if one is dropped to avoid the dummy-variable trap).

  11. What is label encoding and a key risk when using it with non-tree models?

    Label encoding maps each category to an integer (e.g., red=0, green=1, blue=2). Risk: it imposes an artificial ordinal/numeric relationship, so distance- or linear-based models may wrongly infer blue > green > red. It is safe for tree-based models.

  12. What is the 'dummy variable trap' and how is it avoided?

    The dummy variable trap is perfect multicollinearity that occurs when one-hot columns are linearly dependent (they sum to 1). It is avoided by dropping one category column (using $k-1$ dummies), so no column is a linear combination of the others.

  13. Contrast one-hot encoding with target (mean) encoding.

    One-hot creates a binary column per category, increasing dimensionality. Target encoding replaces each category with a statistic of the target (e.g., mean target value for that category), keeping a single column but risking target leakage and overfitting; it needs cross-validation/smoothing.

  14. Why is parsing strings into a proper datetime type important, and name a common pitfall.

    Datetime types enable correct sorting, arithmetic (differences, offsets), and extraction of components. A common pitfall is ambiguous formats like 03/04/2025 (DD/MM vs MM/DD), so an explicit format/locale must be specified to avoid silent misparsing.

  15. What is the difference between a timezone-naive and timezone-aware timestamp?

    A naive timestamp has no timezone information and is ambiguous about the absolute instant. An aware timestamp carries timezone/UTC-offset info, allowing correct conversion between zones and unambiguous ordering across regions.

  16. What are common datetime feature extractions for modeling?

    From a timestamp you can derive year, month, day, day-of-week, hour, quarter, is_weekend, is_holiday, and elapsed time since an event. Cyclical features (hour, month) are often encoded with sine/cosine: $\sin\!\left(\frac{2\pi t}{T}\right)$ and $\cos\!\left(\frac{2\pi t}{T}\right)$.

  17. What is tokenization in text data processing?

    Tokenization splits raw text into smaller units (tokens) — typically words, subwords, or characters. It is the first step that turns a string into a sequence of discrete elements for further processing or vectorization.

  18. Differentiate stemming from lemmatization.

    Stemming crudely chops word endings to a root form (e.g., 'studies' -> 'studi') using rules, possibly producing non-words. Lemmatization maps a word to its dictionary base form (lemma) using vocabulary and part-of-speech (e.g., 'studies' -> 'study'), which is more accurate but slower.

  19. What is the TF-IDF weighting scheme and its formula?

    TF-IDF weights a term by its frequency in a document against its rarity across the corpus: $$\text{tfidf}(t,d) = tf(t,d) \times \log\frac{N}{df(t)}$$ where $N$ is the number of documents and $df(t)$ the number containing term $t$. Common words get low weight; distinctive words get high weight.

  20. What are stop words and why are they often removed?

    Stop words are extremely common words (the, is, and, of) that carry little discriminative meaning. They are often removed to reduce dimensionality and noise, though they can be retained when word order/context matters (e.g., for some deep models).

  21. What is the difference between concatenation and merging/joining of datasets?

    Concatenation stacks datasets along an axis (rows or columns) by position without matching keys. Merging/joining combines datasets by matching values in key columns, aligning rows based on relationships rather than position.

  22. Compare INNER, LEFT, RIGHT, and FULL OUTER joins.

    INNER: only rows with matching keys in both tables. LEFT: all rows from the left table plus matches from the right (nulls where no match). RIGHT: all rows from the right plus matches from the left. FULL OUTER: all rows from both, matched where possible, nulls elsewhere.

  23. What is a cross join (Cartesian product) and how many rows does it produce?

    A cross join pairs every row of one table with every row of the other, with no join condition. For tables of $m$ and $n$ rows it produces $m \times n$ rows.

  24. What is a schema mismatch when combining datasets, and name two common causes and a fix.

    A schema mismatch occurs when datasets to be combined have incompatible structures. Common causes: differing column names for the same concept (e.g., 'DOB' vs 'birth_date') and differing data types/units. Fixes: rename/map columns to a common schema and cast types/units to align before merging.

What this deck covers

The Data Wrangling and Exploration deck follows the Data Science Data Wrangling and Exploration syllabus — 7 chapters and 33 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 7.1 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 240 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

Data Wrangling and Exploration flashcards FAQ

How many Data Wrangling and Exploration flashcards are in this Data Science deck?

50 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these Data Science flashcards free?

Yes. The preview here is free to read with no signup, and the full 50-card deck is free inside the Examius app.

What do the Data Wrangling and Exploration cards cover?

They follow the Data Science Data Wrangling and Exploration syllabus — 7 chapters and 33 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.