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 件のコメント
madhan ravi
madhan ravi 2020 年 9 月 22 日
A short example
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 Center および File ExchangeDatabase Toolbox についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by