Python interview practice
Python Data Analyst Interview Questions
Turn messy data into dependable answers
50 executable pandas and NumPy practice questions from easy to hard covering cleaning, joins, aggregation, windows, cohorts, sessions, attribution, statistics and reconciliation.
Easy (12)
- Total selected columnsRead free
- Filter rows with combined conditions
- Report category shares
- Fill gaps with the median
- Standardize column names
- Count records by month
- Compute percentage change with NumPy
- Filter a date range
- Clean and deduplicate names
- Running balance per account
- Bucket ages into bands
- Remove exact duplicate rows
Medium (26)
- Clean numeric text before aggregationRead free
- Keep the latest event per user
- Count groups without losing null keys
- Aggregate extended revenue
- Validate a dimension join
- Find customers with no recorded order
- Pivot duplicate facts safely
- Fill calendar gaps before rolling
- Measure fixed-cohort retention
- Select top score levels with ties
- Standardize a numeric feature
- Flag IQR outliers
- Summarize skewed measurements
- Compute growth with zero-denominator policy
- Normalize mixed timestamp offsets
- Distinguish pooled and average rates
- Avoid revenue fan-out
- Report column missingness
- Reshape wide metrics into long form
- Select the latest n records per entity
- Reconcile payment and refund movements
- Build an ordered user funnel
- Summarize experiment observations at user grain
- Respect label alignment
- Join the latest prior calibration
- Quantity-weighted average price
Hard (12)
- Split events into sessionsRead free
- Classify products with ABC analysis
- Fit a simple linear regression
- Find each user's longest daily streak
- Median days between orders
- Percentile rank within groups
- Find the first stockout day
- Compare exponential smoothing modes
- Build a correlation matrix with gaps
- Compare first- and last-touch attribution
- Run a two-proportion z-test
- Row percentages with a total row