course
Pandas Sort Values: A Complete How-To
Use sort_values() to reorder rows by column values. Apply sort_index() to rearrange rows by the DataFrame’s index. Combine both methods to explore your data from different angles.
Updated Dec 21, 2024 · 4 min read
Topics
Take Python courses with DataCamp
4 hr
6M
course
Intermediate Python
4 hr
1.2M
course
Data Manipulation with pandas
4 hr
428.4K
See More
RelatedSee MoreSee More
cheat-sheet
Pandas Cheat Sheet for Data Science in Python
A quick guide to the basics of the Python data analysis library Pandas, including code samples.
Karlijn Willems
4 min
tutorial
Sorting in Python Tutorial
Discover what the sort method is and how to do it.
DataCamp Team
1 min
tutorial
How to Sort a Dictionary by Value in Python
Learn efficient methods to sort a dictionary by values in Python. Discover ascending and descending order sorting and bonus tips for key sorting.
Neetika Khandelwal
5 min
tutorial
Pandas Tutorial: DataFrames in Python
Explore data analysis with Python. Pandas DataFrames make manipulating your data easy, from selecting or replacing columns and indices to reshaping your data.
Karlijn Willems
20 min
tutorial
Pandas Reset Index Tutorial
Learn the pandas reset_index() method to reset the index of a DataFrame. Explore the different options available with this method and how to reset the index for simple and multi-level DataFrame.
Satyam Tripathi
8 min
tutorial
Python Select Columns Tutorial
Use Python Pandas and select columns from DataFrames. Follow our tutorial with code examples and learn different ways to select your data today!
DataCamp Team
7 min