1. Home
  2. Data Science
  3. Pandas
  4. How are the results of value_counts() ordered by default?

Added 30 Nov -0001

How are the results of value_counts() ordered by default?

  1. By count, lowest first
  2. By the index labels
  3. By original row order
  4. By count, highest first Correct answer

Correct answer

D. By count, highest first

14 views

MCQSEXAM

Explanation

value_counts sorts by frequency in descending order unless sort=False is passed.

Reference

Asked in: NTS, PPSC IT, Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Pandas MCQs

Practise all Pandas MCQs

Similar MCQs