InterviewStack.io LogoInterviewStack.io

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.

HardSystem Design
53 practiced
Design an automated weekly KPI reporting pipeline that reads source data, uses pandas for incremental aggregation, and publishes results to Power BI or writes Parquet for downstream use. Include scheduling, incremental update logic, testing, monitoring, and how to handle schema drift. Provide a high-level architecture and an example snippet that updates aggregates incrementally.
MediumTechnical
69 practiced
Write pandas code that, given orders DataFrame with columns ['order_id','customer_id','order_date','amount','quantity'], computes per customer the following metrics: total_orders (count), total_amount (sum), avg_order_value (mean of amount), and total_items (sum of quantity). Return a flattened DataFrame with clear column names using named aggregations.
EasyTechnical
97 practiced
How would you find the top 10 customers by total spend using pandas on a transactions DataFrame with columns ['customer_id','amount']? Provide concise code to aggregate, sort, and return the top 10 results. Mention how to handle ties and missing customer IDs.
EasyTechnical
95 practiced
Explain how to use value_counts to get absolute and relative frequencies of a categorical column product_category in pandas. Show code to include NaNs in counts and to return the top 5 categories with their normalized frequencies.
HardTechnical
51 practiced
Describe and implement a memory-efficient strategy to perform a join between a very large fact table (100M rows) and a dimension table (1M rows) on 'user_id' using pandas. Provide code samples for a chunked-join approach, discuss doing the join inside the database instead, and explain correctness, speed and memory trade-offs.

Unlock Full Question Bank

Get access to hundreds of Pandas Data Manipulation and Analysis interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.