Screen categorical features for perfectly separating levels (target leakage) in pandas
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Write a pandas function that scans categorical columns for levels whose binary target rate is exactly 0 or 1 and reports how many rows those levels cover. It tests leakage screening, exact comparisons on proportions, handling of missing values and unused categories, and returning a stable empty schema.