Pandas Data Manipulation and Analysis Questions
Data manipulation and analysis using the Pandas library: reading data from CSV or SQL sources, selecting and filtering rows and columns, boolean indexing, iloc and loc usage, groupby aggregations, merging and concatenating DataFrames, handling missing values with dropna and fillna, applying transformations via apply and vectorized operations, reshaping with pivot and melt, and performance considerations for large DataFrames. Includes converting SQL style logic into Pandas workflows for exploratory data analysis and feature engineering.
HardTechnical
0 practiced
Given a messy dataset that requires multiple reshapes: start wide, melt to long, compute per-group features, and pivot back to wide for ML model training, outline a robust pandas pipeline to do this reproducibly. Provide code snippets for a representative transform chain and discuss testing strategies to validate intermediate shapes and values.
MediumTechnical
0 practiced
You must join and aggregate across partitions (e.g., data is partitioned by month files). Explain how to process partitions one-by-one in pandas to compute global aggregates (e.g., per-user total purchases) without loading all partitions at once. Provide code template using chunks and dictionaries or incremental groupby to accumulate results.
HardTechnical
0 practiced
Design a monitoring and alerting strategy for a daily pandas ETL job that computes features used by an ML model. What metrics would you track (row counts, null rates, distribution shifts), how would you implement automated checks in pandas, and how to alert stakeholders on anomalies? Provide example snippets for computing drift metrics and thresholds.
MediumTechnical
0 practiced
Describe tools and methods to profile pandas memory and CPU hotspots on a large DataFrame. Provide code examples using df.info(memory_usage='deep'), pandas_profiling (or ydata-profiling), and line_profiler or memory_profiler to find slow functions. Explain how to interpret results and prioritize optimizations.
MediumTechnical
0 practiced
You detect duplicate orders in a dataset. Explain different deduplication strategies using pandas: drop_duplicates(keep='first'/'last'), sorting before drop, dedup by subset of columns, and marking duplicates for manual review. Provide code examples and discuss when deduplication should be done vs flagged for business review.
Unlock Full Question Bank
Get access to hundreds of Pandas Data Manipulation and Analysis interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.