Python
#21

Detect and Quantify Missing Values with isna().sum() in Pandas

EasyPwC
Interview Question #21
Asked at PwC

Given a dataset, write a function that returns a summary DataFrame listing each column, its total count of missing values, and the percentage of missing values rounded to 2 decimal places.

Input Table: df_raw
2 rows preview
col_namesample_missing
email20 out of 100 missing
phone5 out of 100 missing
Expected Output Structure2 rows
columnmissing_countmissing_pct
email2020
phone55
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Python 3.10 (Pandas)
Environment Ready

Click "Run & Test" to execute your Pandas code against the test assertions.

Chat with us