Sort by One or Many Columns
Ascending, descending, and ties.
Order Brings Insight
Raw rows arrive in no useful order. Sorting puts the most interesting records on top so patterns jump out at a glance. 🔎
sort_values Is Your Tool
In pandas you reorder rows with sort_values. You name the column to sort by, and pandas hands back a freshly ordered DataFrame.
df.sort_values("price")All lessons in this course
- Sort by One or Many Columns
- Your First groupby Summary
- Line and Bar Charts in matplotlib
- Labels, Titles, and Legends