Display the most occuring categorical element in the column

조회 수: 1 (최근 30일)
Sachin Motwani
Sachin Motwani 2020년 9월 22일
댓글: Sachin Motwani 2020년 9월 22일
For a dataset's column of categorical values, how to display the most occuring element in the column?
  댓글 수: 2
Sachin Motwani
Sachin Motwani 2020년 9월 22일
Like I had the data of number of animals in a huge pet shop. possible, there could be more than one bvariety of dogs, those are still all dogs and so a column naems 'animal name' might contain several animals names repeatedly - say 7 types of dogs and 5 types of cat.
Now, I wish to find which animal I have the maximum variety of. Then I shall use this column to find out the same.

댓글을 달려면 로그인하십시오.

채택된 답변

Sachin Motwani
Sachin Motwani 2020년 9월 22일
Got my answer.
It's the 'mode' function simply.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by