How do you sort a DataFrame by its column or row values using sort_values()?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Sort a pandas DataFrame with sort_values(): by one or several columns in mixed directions, and by the values of a row with axis=1. Tests practical pandas knowledge of missing values, tie order, the key argument and what the method returns.