Skip to content

Glossary: pandas Basics

sort_values

Also written: .sort_values(), sort_index, .sort_index()

Gives back a new DataFrame sorted by one or more columns, smallest first unless `ascending=False`. `.sort_index()` sorts back into index order.

Where the book teaches it

Related terms

nlargestreset_index