Pandas — Top 20 Functions for Data Analyst Interviews 2026
The 20 Pandas methods that appear in 80% of data analyst interviews — explained with real code examples you can run and adapt immediately.
Every function below has appeared in real interview questions at top companies in 2025–2026.
1. df.head(n) / df.tail(n) — preview first or last n rows
2. df.info() — column names, dtypes, non-null counts
3. df.describe() — summary statistics for all numeric columns
4. df.value_counts() — frequency count of a categorical column
5. df.isna().sum() — count missing values per column
6. df.loc[rows, cols] — label-based selection
7. df.groupby().agg() — group and aggregate with named results
8. pd.merge(df1, df2, how, on) — join two DataFrames
9. df.sort_values(col, ascending=False) — sort rows
10. df.fillna(value) / df.dropna() — handle missing values
11. df.drop_duplicates(subset) — remove duplicate rows
12. df[‘col’].str.contains() / str.replace() — string operations
13. pd.to_datetime() + dt accessor — date parsing and extraction
14. df.pivot_table(index, columns, values, aggfunc) — reshape wide
15. df.rename(columns={}) / df.assign() — rename and add columns
16. df.groupby().transform() — broadcast group aggregates back to rows
17. df.apply(func, axis) — apply custom function row or column wise
18. pd.cut() / pd.qcut() — bin continuous variable into categories
19. df.melt(id_vars, value_vars) — unpivot wide to long format
20. df.shift() / df.pct_change() — lag and growth rate on time series
Want to practise these in a live Pandas mock?
Book a free Python mock — we test you on groupby, merge, pivot, and time series questions just like real interviews.
Book Free Python Mock