English

Can you sort a DataFrame with respect to multiple columns?

Advertisements
Advertisements

Question

Can you sort a DataFrame with respect to multiple columns?

Very Short Answer
Advertisements

Solution

Yes, a DataFrame can be sorted with respect to multiple columns by using the sort_values() function and specifying the column names in a list.

shaalaa.com
  Is there an error in this question or solution?
Chapter 3: Data Handling using Pandas - II - Exercise [Page 102]

APPEARS IN

NCERT Informatics Practices [English] Class 12
Chapter 3 Data Handling using Pandas - II
Exercise | Q 4. | Page 102
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×