How are the results of value_counts() ordered by default?
-
A
By count, lowest first
-
B
By the index labels
-
C
By original row order
-
D
By count, highest first
Correct answer
Correct answer
D. By count, highest first
14 views
Explanation
value_counts sorts by frequency in descending order unless sort=False is passed.
Reference
Asked in: NTS, PPSC IT, Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ