PRACTICE BANK

Test what you understand.
Reason through real data-science decisions.

Apply concepts across realistic scenarios, then inspect the reasoning that makes each approach dependable.

100Problems12Skill areas6Reasoning types0Completed

CONTINUE PRACTICE

P01 · Remove Duplicates While Preserving Order

Python Beginner Interpret · 8 min

Continue

100 problems

P01

Remove Duplicates While Preserving Order

Return unique event labels without changing the order in which users first saw them.

#lists#sets#data quality
PythonBeginnerInterpret8 min
Solve
P02

Find the Second Largest Value

Find the runner-up value in a list without treating repeated maximum values as a new rank.

#lists#edge cases#ranking
PythonBeginnerInterpret8 min
Solve
P03

Find Missing Values by Column

Profile null values before deciding whether rows should be imputed, retained, or removed.

#pandas#nulls#data quality
PandasBeginnerInterpret10 min
Solve
P04

Filter High-Value Customers

Select active customers above a revenue threshold without accidentally including incomplete records.

#boolean masks#segmentation#pandas
PandasBeginnerImplement8 min
Solve
P05

Top 5 Customers by Revenue

Aggregate completed orders, then rank customers by revenue without counting cancelled orders.

#group by#aggregation#order by
SQLIntermediateInterpret12 min
Solve
P06

Customers With No Orders

Find customers without purchases using a left join and null logic.

#left join#null#retention
SQLIntermediateInterpret12 min
Solve
P07

Mean vs Median With a Salary Outlier

Choose the summary statistic that best represents a skewed salary distribution.

#mean#median#outliers
StatisticsBeginnerCalculate10 min
Solve
P08

Compare Variability Using Standard Deviation

Compare two product lines with similar average demand but different week-to-week volatility.

#standard deviation#variability#operations
StatisticsIntermediateInterpret12 min
Solve
P09

99% Accuracy, Zero Fraud Detected

Diagnose a fraud model that looks accurate overall but fails at the outcome the business cares about.

#class imbalance#recall#precision
Model EvaluationIntermediateDiagnose14 min
Solve
P10

Diagnose an Overfitting Model

Interpret a large training-validation gap and select evidence-based next steps.

#overfitting#validation#regularization
Machine LearningIntermediateDiagnose14 min
Solve
P11

Should You Scale Features Before KNN?

Decide whether scaling is necessary when distance drives a model's predictions.

#KNN#feature scaling#distance
Feature EngineeringIntermediateInterpret10 min
Solve
P12

Feature Engineering From a Date Column

Turn raw order timestamps into calendar features while avoiding assumptions about the target.

#dates#pandas#features
Feature EngineeringBeginnerDesign10 min
Solve
P13

Count Frequency of Categories

Create a frequency table for survey responses without assuming every category is present.

#dictionaries#frequency#categorical-data
PythonBeginnerCalculate8 min
Solve
P14

Aggregate Transactions by Customer

Aggregate transaction records into customer-level revenue and order counts.

#aggregation#dictionaries#transactions
PythonIntermediateImplement12 min
Solve
P15

Process a Large Stream Without Loading Everything Into Memory

Design a memory-safe approach for a multi-gigabyte clickstream file.

#generators#streaming#memory
PythonAdvancedImplement16 min
Solve
P16

Revenue by Product Category

Summarize completed sales by product category for a merchandising report.

#group-by#revenue#aggregation
SQLBeginnerInterpret10 min
Solve
P17

Monthly Revenue Growth

Calculate month-over-month revenue growth while handling a month with no prior comparison.

#window-functions#lag#time-series
SQLIntermediateCalculate14 min
Solve
P18

Rolling 7-Day Revenue

Build a rolling revenue metric that does not hide days with zero sales.

#window-functions#date-spine#rolling-metrics
SQLAdvancedInterpret18 min
Solve
P19

Rename and Standardize Columns

Normalize a messy vendor file so downstream code can use predictable field names.

#pandas#schema#column-names
PandasBeginnerImplement8 min
Solve
P20

Group Sales by Region

Create a regional sales summary with revenue and unique-customer counts.

#groupby#aggregation#sales
PandasIntermediateInterpret10 min
Solve
P21

Diagnose Unexpected Results After a Merge

Investigate why a customer-order merge suddenly produces far more rows than either input.

#merge#duplicates#cardinality
PandasAdvancedDiagnose16 min
Solve
P22

Interpret a Confidence Interval

Interpret a confidence interval without claiming it gives the probability of a fixed parameter.

#confidence-interval#uncertainty#sampling
StatisticsIntermediateInterpret12 min
Solve
P23

Evaluate an A/B Test Beyond Statistical Significance

Decide whether a statistically significant conversion lift is worth shipping.

#ab-testing#effect-size#power
StatisticsAdvancedInterpret18 min
Solve
P24

Classification or Regression?

Select the learning task that matches the business outcome rather than the tool you want to use.

#targets#supervised-learning#problem-framing
Machine LearningBeginnerChoose8 min
Solve
P25

Diagnose an Underfitting Model

Recognize when a model is too simple rather than overfit.

#underfitting#bias#model-complexity
Machine LearningIntermediateDiagnose12 min
Solve
P26

Detect Data Leakage Before Deployment

Identify a feature that is highly predictive only because it is created after the outcome.

#leakage#time-splits#deployment
Machine LearningAdvancedDiagnose18 min
Solve
P27

Standardize Inconsistent Category Labels

Clean inconsistent product-category labels without hiding genuinely unknown values.

#categories#normalization#data-quality
Data CleaningBeginnerImplement10 min
Solve
P28

Clean Mixed Date Formats

Parse a column containing multiple date formats without silently swapping day and month.

#dates#parsing#data-quality
Data CleaningIntermediateImplement14 min
Solve
P29

Resolve Conflicting Customer Records

Create a defensible rule for conflicting customer records from CRM and billing systems.

#entity-resolution#source-priority#data-governance
Data CleaningAdvancedInterpret18 min
Solve
P30

Detect Invalid Customer Records

Flag records with impossible or internally inconsistent customer values.

#validation#business-rules#data-quality
Data CleaningIntermediateDiagnose12 min
Solve
P31

Create a Customer Tenure Feature

Turn signup dates into a tenure feature available at a defined prediction date.

#dates#tenure#customer-analytics
Feature EngineeringBeginnerInterpret10 min
Solve
P32

Leakage-Safe Target Encoding

Encode a high-cardinality category without letting each row learn from its own target.

#target-encoding#leakage#cross-validation
Feature EngineeringAdvancedDiagnose18 min
Solve
P33

Read a Confusion Matrix

Translate confusion-matrix cells into business errors for a loan pre-screening model.

#confusion-matrix#classification#metrics
Model EvaluationBeginnerInterpret10 min
Solve
P34

Choose a Precision-Recall Tradeoff

Choose an operating threshold for a review team with limited capacity.

#precision#recall#thresholds
Model EvaluationIntermediateChoose14 min
Solve
P35

Cost-Sensitive Model Selection

Choose between models with conflicting metrics using an explicit error-cost model.

#cost-sensitive#thresholds#business-metrics
Model EvaluationAdvancedInterpret18 min
Solve
P36

Diagnose Poor Probability Calibration

Decide whether predicted probabilities can be trusted for risk prioritization.

#calibration#probabilities#reliability-curve
Model EvaluationAdvancedDiagnose16 min
Solve
P37

Choose a Tree, Random Forest, or Boosting Model

Choose a tree model from operational trade-offs, not score alone.

#trees#random forest#boosting
Machine LearningIntermediateChoose12 min
Solve
P38

Customer Segmentation With K-Means

Reason about scaling, K selection, and cautious cluster interpretation.

#k-means#clustering#scaling
Unsupervised LearningIntermediateCalculate12 min
Solve
P39

Interpret a PCA Projection

Interpret explained variance and PCA's representational trade-off.

#pca#dimensionality reduction#explained variance
Machine LearningIntermediateInterpret10 min
Solve
P40

Residuals and Model Error

Calculate residuals, absolute errors, and MAE.

#regression#residuals#mae
Machine LearningBeginnerCalculate10 min
Solve
P41

Training Loss Falls, Validation Loss Rises

Diagnose overfitting from training history.

#deep learning#overfitting#epochs
Deep LearningIntermediateDiagnose10 min
Solve
P42

Does This Knowledge Assistant Need RAG?

Choose RAG, deterministic systems, or prompt context based on the task.

#rag#retrieval#system design
Generative AI / RAGIntermediateChoose12 min
Solve
P43

Evaluate a RAG Answer

Separate retrieval, generation, groundedness, and citation quality.

#rag#groundedness#hallucinations
Generative AI / RAGAdvancedDiagnose15 min
Solve
P44

Choose and Interpret an EDA Chart

Choose charts for exploratory questions and interpret them cautiously.

#eda#visualization#distributions
StatisticsBeginnerChoose10 min
Solve
P45

Vectorize a Calculation Instead of Looping Row by Row

Use NumPy element-wise operations and boolean masks.

#numpy#arrays#vectorization
NumPyIntermediateImplement10 min
Solve
P46

Trace a List Mutation That Duplicated Revenue Labels

Trace a small function to find a shared-list mutation that duplicates a revenue label.

#diagnose#lists#mutation
PythonBeginnerDiagnose5 min
Solve
P47

Define a Function Contract for a Revenue Parsing Helper

Design input, output, and edge-case behavior for a messy revenue parsing helper.

#design#functions#parsing
PythonBeginnerDesign10 min
Solve
P48

Implement a Safe Running Category Counter

Update category counts without hidden shared state between calls.

#implement#dictionaries#state
PythonBeginnerImplement6 min
Solve
P49

Diagnose a Join Explosion After Merging Orders and Pageviews

Find why a merge multiplied rows before conversion was calculated.

#diagnose#merge#join-grain
PandasIntermediateDiagnose14 min
Solve
P50

Choose Wide or Long Format for Weekly Channel Metrics

Choose a table shape for weekly channel trend analysis and visualization.

#choose#wide#long-format
PandasBeginnerChoose10 min
Solve
P51

Implement a Reshape From Wide Experiment Results to Long Format

Convert variant columns into a tidy experiment-results table.

#implement#melt#reshape
PandasBeginnerImplement10 min
Solve
P52

Calculate Conversion Rate With the Right Session Denominator

Calculate conversion with purchases and sessions at the same grain.

#calculate#conversion#aggregation
SQLBeginnerCalculate5 min
Solve
P53

Calculate Each Store's Share of Regional Revenue

Compute each store's revenue share inside its region.

#calculate#window-functions#revenue
SQLBeginnerCalculate6 min
Solve
P54

Choose WHERE or HAVING for a Low-Volume Customer Filter

Choose the filtering stage for a rule based on aggregated order counts.

#choose#having#group-by
SQLBeginnerChoose4 min
Solve
P55

Design a Window-Function Query for Latest Subscription Status

Return each user's latest subscription state while retaining plan history.

#design#window-functions#subscriptions
SQLIntermediateDesign14 min
Solve
P56

Calculate a Weighted Average Rating Across Product Lines

Combine segment ratings using their sample sizes.

#calculate#weighted-average#ratings
StatisticsBeginnerCalculate5 min
Solve
P57

Calculate the Margin of Error Behind a 95% Confidence Interval

Calculate a 95% proportion interval's margin component and interpret its width.

#calculate#confidence-interval#proportions
StatisticsIntermediateCalculate12 min
Solve
P58

Diagnose Selection Bias in a Voluntary Survey Result

Diagnose why a voluntary survey can overstate sentiment.

#diagnose#selection-bias#surveys
StatisticsBeginnerDiagnose5 min
Solve
P59

Calculate the Output of a Broadcasted Price Adjustment

Calculate prices after one discount vector is broadcast across a product-price matrix.

#numpy#arrays#broadcasting
NumPyBeginnerCalculate5 min
Solve
P60

Calculate a Standardized Feature Vector by Hand

Compute z-scores for a small feature vector and connect them to vectorized standardization.

#numpy#arrays#standardization
NumPyBeginnerCalculate6 min
Solve
P61

Diagnose Leakage From a Post-Outcome Feature

Identify a feature available only after the outcome.

#diagnose#leakage
Feature EngineeringIntermediateDiagnose12 min
Solve
P62

Choose an Encoding Strategy for a High-Cardinality Category

Choose encoding for a category with many values.

#choose#encoding#high-cardinality
Feature EngineeringIntermediateChoose12 min
Solve
P63

Design a Group-Aware Validation Split

Design evaluation when entities have multiple rows.

#design#group validation
Machine LearningAdvancedDesign18 min
Solve
P64

Interpret a Logistic Regression Probability Shift

Interpret a coefficient without treating it as probability points.

#logistic regression#odds
Machine LearningIntermediateInterpret6 min
Solve
P65

Diagnose Unstable Feature Importance Across Model Runs

Explain shifting importance among correlated predictors.

#diagnose#feature importance#correlation
Machine LearningAdvancedDiagnose14 min
Solve
P66

Choose a Classification Threshold Under Asymmetric Costs

Choose a threshold from error costs.

#choose#thresholds#costs
Model EvaluationIntermediateChoose12 min
Solve
P67

Calculate Precision and Recall From an Alert Table

Calculate alert precision and recall.

#calculate#precision#recall
Model EvaluationBeginnerCalculate5 min
Solve
P68

Interpret a Miscalibrated Probability Model

Compare predicted buckets with observed frequencies.

#calibration#interpretation
Model EvaluationAdvancedInterpret13 min
Solve
P69

Design Evaluation for a Rare-Event Classifier

Design rare-event classifier evaluation.

#design#rare events#precision recall
Model EvaluationAdvancedDesign18 min
Solve
P70

Diagnose Unstable Customer Segments Across K-Means Runs

Diagnose unstable K-Means assignments.

#diagnose#clustering#k-means
Unsupervised LearningAdvancedDiagnose16 min
Solve
P71

Choose Whether to Standardize Features Before K-Means

Decide scaling for distance-based clustering.

#choose#clustering#standardization
Unsupervised LearningIntermediateChoose5 min
Solve
P72

Implement a Minimal Train and Validation Loop

Separate model training and validation states.

#implement#deep learning#validation
Deep LearningIntermediateImplement14 min
Solve
P73

Diagnose a Diverging Neural Network Training Run

Prioritize debugging from an exploding-loss trace.

#diagnose#deep learning#optimization
Deep LearningAdvancedDiagnose14 min
Solve
P74

Design an Evaluation Set for a RAG System

Design RAG evaluation that separates retrieval from grounding.

#design#rag#evaluation
Generative AI / RAGAdvancedDesign18 min
Solve
P75

Implement Metadata-Aware Chunk Preparation for RAG

Prepare chunks with source metadata for later retrieval.

#implement#rag#metadata
Generative AI / RAGIntermediateImplement12 min
Solve
P76

Diagnose Duplicate Customer Rows After Data Cleaning

Diagnose unexpected duplicate customer rows by tracing keys, source grain, and merge behavior.

#diagnose#duplicates#data grain
Data CleaningIntermediateDiagnose14 min
Solve
P77

Choose a Missing-Data Strategy for Income and Region

Choose separate missing-data treatments for numeric income and categorical region.

#choose#missing data#imputation
Data CleaningIntermediateChoose14 min
Solve
P78

Implement a Defensive Numeric Cleaning Helper

Convert messy currency-like strings into numeric values while making invalid values visible.

#implement#pandas#numeric cleaning
Data CleaningBeginnerImplement10 min
Solve
P79

Design a Feature Availability Contract for Rolling Metrics

Define a time contract that prevents rolling behavioral features from using future information.

#design#leakage#rolling metrics
Feature EngineeringAdvancedDesign18 min
Solve
P80

Diagnose Leakage From a Customer Lifetime Aggregate

Diagnose why a full-lifetime customer aggregate leaks future behavior into an earlier prediction.

#diagnose#leakage#aggregates
Feature EngineeringIntermediateDiagnose14 min
Solve
P81

Choose a Baseline Before Training a Complex Ensemble

Choose a defensible simple baseline before evaluating a complex ensemble.

#choose#baseline#model selection
Machine LearningBeginnerChoose8 min
Solve
P82

Interpret Learning Curves for Bias and Variance

Interpret compact training and validation learning-curve evidence.

#interpret#learning curves#bias variance
Machine LearningIntermediateInterpret12 min
Solve
P83

Design a Time-Aware Validation Strategy

Design chronological validation for a system that predicts future observations.

#design#time-aware validation#deployment
Machine LearningAdvancedDesign18 min
Solve
P84

Calculate Expected Cost Across Two Classification Thresholds

Calculate operational cost at two thresholds and choose the lower-cost policy.

#calculate#thresholds#costs
Model EvaluationIntermediateCalculate8 min
Solve
P85

Diagnose High AUROC but Poor Alert Precision

Diagnose why strong ranking quality can coexist with poor precision at an operational threshold.

#diagnose#auroc#precision
Model EvaluationAdvancedDiagnose16 min
Solve
P86

Choose Macro or Weighted F1 for an Imbalanced Multiclass Problem

Choose an F1 averaging method based on an explicit multiclass evaluation goal.

#choose#f1#multiclass
Model EvaluationIntermediateChoose12 min
Solve
P87

Implement Group-Level Normalization With Pandas Transform

Normalize values relative to each row's group while preserving the original DataFrame shape.

#implement#groupby#transform
PandasBeginnerImplement8 min
Solve
P88

Design a SQL Deduplication Step Before Revenue Aggregation

Deduplicate versioned transactions before aggregating revenue.

#design#sql#deduplication
SQLIntermediateDesign14 min
Solve
P89

Calculate the Expected Number of False Positives

Calculate expected false alarms from case volume, negative prevalence, and a false-positive rate.

#calculate#false positives#probability
StatisticsIntermediateCalculate8 min
Solve
P90

Implement a Bootstrap Confidence Interval for a Median

Implement a compact bootstrap interval for uncertainty around a sample median.

#implement#bootstrap#median
StatisticsAdvancedImplement16 min
Solve
P91

Diagnose Training-Serving Skew in a Feature Pipeline

Diagnose an offline-to-online feature mismatch without confusing it with ordinary overfitting.

#diagnose#training-serving skew#feature pipeline
Feature EngineeringAdvancedDiagnose18 min
Solve
P92

Design a Model Selection Rule Across Validation Folds

Design a model-selection rule using average performance, fold variability, and complexity.

#design#cross-validation#model selection
Machine LearningIntermediateDesign14 min
Solve
P93

Interpret Performance Drift Across Customer Cohorts

Interpret cohort-level performance changes without overclaiming a root cause.

#interpret#drift#cohorts
Model EvaluationAdvancedInterpret16 min
Solve
P94

Choose an Outlier Treatment Before Revenue Aggregation

Choose a context-aware treatment for extreme revenue values before reporting a KPI.

#choose#outliers#revenue
Data CleaningIntermediateChoose14 min
Solve
P95

Implement a Reproducible SQL Cohort Table

Build a deterministic cohort table from each user's first qualifying event.

#implement#sql#cohorts
SQLIntermediateImplement14 min
Solve
P96

Calculate Uncertainty for a Difference in Conversion Rates

Calculate approximate uncertainty around a difference in conversion rates.

#calculate#conversion#confidence interval
StatisticsIntermediateCalculate10 min
Solve
P97

Diagnose Cluster Instability After Adding Encoded Features

Diagnose instability caused by representation and distance choices in a clustering pipeline.

#diagnose#clustering#encoded features
Unsupervised LearningAdvancedDiagnose18 min
Solve
P98

Implement Early Stopping Logic From Validation Loss

Implement compact validation-loss early stopping with patience and best-state restoration.

#implement#deep learning#early stopping
Deep LearningIntermediateImplement14 min
Solve
P99

Design a Failure Taxonomy for RAG Evaluation

Design a separable RAG failure taxonomy that supports debugging beyond one aggregate score.

#design#rag#evaluation
Generative AI / RAGAdvancedDesign18 min
Solve
P100

Interpret a Cohort Retention Table With Changing Denominators

Interpret retention percentages when cohorts have different initial sizes and incomplete later periods.

#interpret#cohorts#retention
PandasIntermediateInterpret12 min
Solve

LOCAL PROGRESS · 0 completed · 100 remaining