📥 Download Complete 2026 Printable PDF Notes, Architecture Diagrams & GitHub Code
Get instant free access to the 2026 printable PDF cheat-sheet, runnable lab repositories, interview evaluation rubric, and AI Campus 6-Month Paid Corporate Internship roadmap.
Download Free PDF & Syllabus Roadmap →Top 10 Senior Python, Pandas & NumPy for Data Science Technical Interview Questions & Answers (2026)
Rigorous technical interview questions, mathematical foundations, code implementations, and architectural explanations asked during senior engineering and specialist hiring rounds at FAANG, Tier-1 MNCs, and high-growth AI unicorns.
Q1 How does Pandas handle missing data (NaN vs None), and what is the difference between dropna() and fillna() methods?
Pandas uses NumPy NaN (float) to represent missing numerical data, while None is Python's native null object.
dropna() eliminates entire rows or columns along an axis according to threshold criteria, while fillna() replaces null values with mean, median, forward-fill (ffill), or backward-fill (bfill) methods to maintain dataset continuity.
Q2 What is the memory and performance difference between apply(), map(), and vectorized operations in Pandas?
Vectorized operations utilize precompiled C routines through NumPy ufuncs, executing orders of magnitude faster without Python interpreter overhead.
apply() iterates across rows or columns in Python bytecode, which is slow for large datasets. Vectorization should always be prioritized.
Q3 Explain the difference between loc and iloc in Pandas with multi-indexing.
loc is label-based selection where both start and stop boundaries are inclusive.
iloc is purely integer position-based (0 to length-1) where the stop boundary is exclusive, matching standard Python slicing.
Q4 How does Pandas groupby() work under the hood (Split-Apply-Combine)?
GroupBy partitions dataframe rows into subsets by hash values of the key columns, applies an aggregation or transformation function to each group in parallel, and combines the results into an output DataFrame.
Q5 What is broadcasting in NumPy and what are the strict rules for dimension compatibility?
Broadcasting allows NumPy to perform arithmetic operations on arrays of different shapes without unneeded memory copying.
Two dimensions are compatible when: 1. They are equal, or 2. One of them is 1. If lengths differ, dimensions are prepended with 1 on the left.
Q6 Explain memory optimization techniques for massive Pandas DataFrames (downcasting & categoricals).
Default float64 and int64 consume 8 bytes per value. Converting int64 to int16/int32 and object columns with low cardinality to 'category' dtypes often reduces memory usage by 80-90%.
Q7 How do you merge, join, and concatenate DataFrames in Pandas?
pd.concat() stacks dataframes along an axis (rows or columns) preserving indices.
pd.merge() performs database-style joins (inner, left, right, outer) based on common key columns, while DataFrame.join() merges on index values by default.
Q8 How do you detect and handle outliers in Pandas using IQR and Z-Score?
IQR method calculates Q1 (25th percentile) and Q3 (75th percentile). Any data point below Q1 - 1.5*IQR or above Q3 + 1.5*IQR is flagged as an anomaly.
Q9 What is method chaining and pipe() in Pandas and why is it preferred for production code?
Method chaining produces readable, functional transformations without creating unnecessary intermediate variables in memory.
Q10 How do you handle DateTime data in Pandas (resample, rolling window, timezones)?
Converting columns to pd.to_datetime enables powerful time-series operations such as resample('M') for monthly aggregates and rolling(window=7).mean() for moving averages.
Accelerate Your Career with Guaranteed Paid Internship*
Transparent ₹1,20,000 Fee (Inclusive of GST) • ₹10,000/month No-Cost EMI • 6-Month Corporate Paid Internship (₹15,000 – ₹35,000/mo stipend) with official IBM & Microsoft Credly credentials.
Data Science, Python, Machine Learning & GenAI
Master Python, SQL, XGBoost, PyTorch & RAG with official IBM & Microsoft credentials + Guaranteed 6-Month Paid Corporate Internship* (₹1,20,000 / ₹10,000 per month 0% EMI).
