How can you sort a pandas DataFrame or a Series?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to sort a pandas DataFrame or Series by values or by index labels. Tests working knowledge of the pandas sorting API, including multi-column sorts with mixed directions, missing values, custom orders and what happens to the index after sorting.