Why does NaN != NaN evaluate to True, and what are the implications for comparing or checking floating-point arrays?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Explain why NaN compares unequal to itself under IEEE 754 floating-point rules and what that means when you search, compare or test NumPy arrays. It tests your knowledge of NaN comparison semantics, np.isnan, equal_nan options, NaN-aware aggregations and common pitfalls in pandas.