What is an ordered categorical, and how does it enable comparison and sorting?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Explain what an ordered categorical is in pandas, how to create one, and how it changes comparisons, sorting and min/max compared with unordered categoricals and plain strings. It tests working knowledge of the category dtype and its common pitfalls.